You are here: Re: how to make a div with a pic... « HTML « IT news, forums, messages
Re: how to make a div with a pic...

Posted by dorayme on 07/15/07 22:24

In article <o7kmi.191920$Fv1.116173@reader1.news.saunalahti.fi>,
"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote:

> Scripsit dorayme:
>
> >>> http://tinyurl.com/2dcgfx

> > You remind me to add a couple of px or so padding too to allow
> > some grace...
>
> Well, wouldn't it be simpler to use your favorite image processing program
> to add a border to the image itself? Then you would see the bordered image
> before putting it onto your page, and you would be reminded, by your own
> eyes, about the need to add some padding between the camel and the borders.
> This would cost a few bytes in image size, but on the other hand, you would
> not need the CSS code for padding and border. Besides, your image would
> appear with the border even when CSS is off.
>

Let us put aside the particular issue of this pic because you
raise an interesting general point with which I both agree and
disagree with in different respects.

The pic of the camel is already possibly the most unimportant pic
in the whole wwc [1]. It has so little going for it that taking
even flexibility from it would be a crime! Which brings me to the
serious issue.

The power of css is such that one can add padding and borders to
things in a most simple way, including pictures. Once you fix
something into a picture, that is it, it loses all practical
flexibility. CSS is for styling. Borders and padding are style
issues. (Perhaps one can manage the css and divs to cut off real
borders with tricks but let us leave such complications aside. In
css it is easier to give than to take away and flexibility is the
topic here).

Let us just concentrate on padding for now to make a point about
trade-offs. If there is no real inbuilt padding, author has
maximum flexibility. He might want no padding for some pages on
which a particular pic appears and lots on another. He might want
it one way on a particular page at one time, but not at another
time. I am sure you understand this.

Now, there is an issue with css being turned off. [2] In this
situation the author is faced with a dilemma, to build a padding
inside the pic as a safety net for such a situation and to
forego, as a direct result, flexibility or to follow the
teachings of our church and to truly separate style from content
and trust to the gods.

Talking about flexibility, I am reminded further, I must turn
that pic into a gif and include transparency and make it even
more flexible.

> You get 5 minus points for alt="a camel". It results on those silly words
> appearing between paragraphs of text,

You have me on that one. (5! Your scale is very severe!) Look,
that page and pic was done before I started taking alt text pills
(which pills were, in turn, made by a chemist who I gave specific
instructions to base them on your writings on this subject).

See my correction at http://tinyurl.com/2dcgfx

-------------
1. wide world of camels

2. Helpfully, IE provides a 3px gap. At least up until recently
this has meant that at least there is a 3px gap on at least one
side for a majority of viewers. This note is to tease Bergamot
who thinks it is a bug.

--
dorayme

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация