On 12/11/05, Nathan Wheatley <[EMAIL PROTECTED]> wrote:
> Hi again,
>
> With regard to pixel values in the line height. I just found this
> (http://www.simplebits.com/notebook/2004/07/18/clickable.html)
> article, and it is used there. I persoanlly can't see a problem with
> it, but if you can tell me why you would not use, it, it would be much
> appreciated.

Sure, I'll explain the problem with pixel line heights, and hopefully
some other list members can cover any points I miss.

First of all, the article you mention is old... almost a year and a
half old. But more important than that, the technique it talks about
doesn't need a pixel defined line height to work. If you know your
icon is about the same height as the text size you are using (let's
say these are chunky links at 1.2 em), then you don't need an absolute
line height, but just a line height that is relative to the height of
the text. So if your text is 1.2 em, then a line height of 1.8 would
give enough room above and below the text to produce an identical
effect.

Another way to do this, if you want some extra pixel space above and
below, is to just add pixel padding... padding doesn't confine text to
a fixed height the way line-height does. And here's why confining text
to a fixed line height is bad...

... because everyone who sees your text, who happens to have a default
text size larger than your line height, can't read the text at all...
because the lines will either overlap each other, or the top and
bottom of the letters will be hidden. And that's very hard to get
around.

If there wasn't any other way to do the technique that you mentioned,
then I wouldn't be so critical of it, but the fact that a pixel line
height is not necessary is exactly why you shouldn't even bother. The
article is allright, but like many articles about techniques on the
web, especially old ones, it has a mistake. And I really wish some of
these old articles would get edited, because lots of these techniques
just get cut-n-pasted, and these mistakes end up all over the web. But
I've answered your question, so I shouldn't rant. Hope that helps.

As for your page, if no one else helps, I'll help you with it tomorrow
when I have more time. Back to studying...

--
--
Christian Montoya
christianmontoya.com ... rdpdesign.com ... cssliquid.com
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to