after all these days (was: supposed to be Netscape related :-)
by "Eric Bednarz" <doublebase(at)wanadoo.nl>
|
Date: |
Sat, 21 Jul 2001 04:28:20 +0200 |
To: |
<hwg-techniques(at)hwg.org> |
References: |
|
|
todo: View
Thread,
Original
|
|
*amused like hell*
a few days ago a fellow list member puzzled the HWG techniques list with
this problem:
...
a.sellblk:link { color: #000; font-size: 10px; font-family: Verdana,
Arial, sans-serif; text-decoration: none; line-height: 18px; padding-left:
10px }
...
<.td>
<.a href="dead.html" class="sellblk">Deadline & application</a><.br>
<.a href="eligibility.html" class="sellblk">Eligibility</a><br>
...
why would that little bastard Netscape refuse to display the correct
line-height and add so much extra space?
<...you may want to skip this if you are in a hurry...>
this confused me so much that i actually made an html document with the code
to see it for myself.
and really, another unexpected major bug in netscape was discovered :-D
i fixed it in 5 seconds, putting the last 2 properties of the link class
into a class for td.
funny enough, in my reply i just altered the original mail a bit, and since
this was a line-height problem i left the padding where it was.
next day i had to learn that this wouldn't work.
well, now i was really puzzled; oh well, it was about netscape 4.*; maybe an
older version than mine then?
same day i learned from another reply that netscape would always add extra
space to the line-height and why.
assuming that css is the art of trial and error i lost 15 minutes of my life
but could provide a working solution to the problem (by now stubborn looking
at the issue from the wrong side of the road) and forgot about it.
today i received a grateful email; my solution worked fine in an older 4.*
version than mine.
i was happy to hear that, saw my code again and ... uhmpf
<...hello again...>
as everybody else who had a look at it i was totally missing the point.
the problem is embarrassing simple:
it's not about the line-height property at all
(i couldn't understand that in the 1st place).
tataaaaaaa: padding is a box property...
explorer ignores the padding applied to the inline element, netscape
displays it but adds extra line-height.
apply the property to the appropriate element and both browsers give you a
hug.
suspecting funny browser conflicts behind everything can become an
entertaining source of crosseyed expertise :-D
(and mailing list guerilla wars)
also, this teaches me what i already knew:
if you're too stupid to detect the problem right away, only change one thing
at a time
*bumps his head 404 times against the wall*
cheers, eric
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA