HighDots Forums  

Why does IE add a pixel of white space around my links?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Why does IE add a pixel of white space around my links? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Alan Silver
 
Posts: n/a

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 10:02 AM






In article <1146130221.093067.187400 (AT) u72g2000cwu (DOT) googlegroups.com>, VK
<schools_ring (AT) yahoo (DOT) com> writes
Quote:
Must be because the link boxes are having "pack width" as opposed to
"max width". By setting width:100% for LI elements eliminates the gaps.
Thanks, that was the simplest solution.

--
Alan Silver
(anything added below this line is nothing to do with me)


Reply With Quote
  #12  
Old   
Alan Silver
 
Posts: n/a

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 10:03 AM






In article <1146130221.093067.187400 (AT) u72g2000cwu (DOT) googlegroups.com>, VK
<schools_ring (AT) yahoo (DOT) com> writes
Quote:
btw if you decided to force W3C on IE, then play by the rules ;-) In
CSS1Compat mode there are not default measurement units, so IE has all
rights to ignore margin:0 declaration. It doesn't do it of a good of
its heart :-) but margin: 0px 0px would be more appropriate.
Funny, I used to use units for zero measurements, but having seen people
here say many times that you don't need them, I thought I'd be al grown
up and leave them off. Looks like I should have stuck with my old
habits!!

Ta ra

--
Alan Silver
(anything added below this line is nothing to do with me)


Reply With Quote
  #13  
Old   
Alan Silver
 
Posts: n/a

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 10:06 AM



In article <1146137816.944860.54420 (AT) g10g2000cwb (DOT) googlegroups.com>, VK
<schools_ring (AT) yahoo (DOT) com> writes
Quote:
VK wrote:
simply open the
OP's link in IE 6, File > Save As > Web page complete. You will get the
normalized version of the page: not what is served from the server, but
what IE sees internally.

I forgot to mention that it also will reveal the sad fact that your
XHTML declaration goes by the "Unrecognized DTD" rule as spelled in the
same article (which I hope you already printed out and finished fixing
on the wall near of your computer :-)
Printing out even as we speak. Will probably be stuck on the toilet
wall, partly as it is more likely to be read there, and partly because
it seems like an appropriate place to put an article about IE's
"advanced" handling on CSS!!

Quote:
So any XHTML (even the most Strict) in IE becomes "-//W3C//DTD HTML
4.01 Transitional//EN" pollued with all kind of trash all around :-(
;-)
Harumph. Dontcha just *lurve* IE?

Ta ra

--
Alan Silver
(anything added below this line is nothing to do with me)


Reply With Quote
  #14  
Old   
Michael Winter
 
Posts: n/a

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 10:13 AM



On 27/04/2006 16:03, Alan Silver wrote:

[snip]

Quote:
Funny, I used to use units for zero measurements, but having seen people
here say many times that you don't need them, I thought I'd be al grown
up and leave them off. Looks like I should have stuck with my old habits!!
When the majority say something - in this case, that units are optional
for zero length values - and VK says something else, ignore the latter.

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.


Reply With Quote
  #15  
Old   
Ken Loomis
 
Posts: n/a

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 10:19 AM



On Thu, 27 Apr 2006 16:02:40 +0100, Alan Silver
<alan-silver (AT) nospam (DOT) thanx.invalid> wrote:

Quote:
In article <1146130221.093067.187400 (AT) u72g2000cwu (DOT) googlegroups.com>, VK
schools_ring (AT) yahoo (DOT) com> writes
Must be because the link boxes are having "pack width" as opposed to
"max width". By setting width:100% for LI elements eliminates the gaps.

Thanks, that was the simplest solution.
It doesn't work for me. The li width has to be 99% and the visited,
etc. width has to be 100%. And I haven't tested on different
resolutions.

Ken



Reply With Quote
  #16  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 10:40 AM



On Thu, 27 Apr 2006, Michael Winter wrote:

Quote:
On 27/04/2006 16:03, Alan Silver wrote:

Funny, I used to use units for zero measurements, but having seen
people here say many times that you don't need them, I thought I'd
be al grown up and leave them off. Looks like I should have stuck
with my old habits!!

When the majority say something - in this case, that units are
optional for zero length values - and VK says something else, ignore
the latter.
As always with usenet, it's best to use the answers as clues, and go
read the specification to see what it really says. Even those of us
who care about giving accurate answers are going to make mistakes from
time to time.


Reply With Quote
  #17  
Old   
Alan Silver
 
Posts: n/a

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 10:53 AM



In article <r4o152ploq1fegoviaoes547jfkt3aodv3 (AT) 4ax (DOT) com>, Ken Loomis
<not_a_real_email (AT) address (DOT) com> writes
Quote:
Must be because the link boxes are having "pack width" as opposed to
"max width". By setting width:100% for LI elements eliminates the gaps.

Thanks, that was the simplest solution.

It doesn't work for me. The li width has to be 99% and the visited,
etc. width has to be 100%. And I haven't tested on different
resolutions.
Hmm, I just tried it on IE6, FF and Opera and they all worked fine. IE5
showed some extraneous spaces below the links, but the widths were fine.

What browser, font size, etc were you using when it didn't work?

I've updated the sample page to show my latest incarnation. Please try
this one and see if it works for you. I'm puzzled as to how it works for
me and not you.

http://www.kidsinaction.org.uk/fd/homepage.html

Ta ra

--
Alan Silver
(anything added below this line is nothing to do with me)


Reply With Quote
  #18  
Old   
VK
 
Posts: n/a

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 10:55 AM




Michael Winter wrote:
Quote:
On 27/04/2006 16:03, Alan Silver wrote:

[snip]

Funny, I used to use units for zero measurements, but having seen people
here say many times that you don't need them, I thought I'd be al grown
up and leave them off. Looks like I should have stuck with my old habits!!

When the majority say something - in this case, that units are optional
for zero length values - and VK says something else, ignore the latter.
OK, OK! In the very first post here I said <q>IE has all rights to
ignore margin:0 declaration. It doesn't do it of a good of its heart
:-)</q>
(where once again "rights" are based on Microsoft own specs, not W3C
ones).

So later assumption (that it makes it upset) was wrong. I just did not
read right the "normalized" source code. It appears that while IE rolls
up PADDING shortcut so it becomes PADDING-LEFT, PADDING-TOP etc., the
MARGIN shortcut is not rolled up. I originally thought that if was
caused by margin:0; declaration, but it stays the same for any
declaration.

So yes, everyone is entitled for his holly right to use margin:0
shortcut :-)

About the statement the "0 is always 0 in any mesures" it is correct
for a simple case like margin:0;
It is getting more puzzling in a case like margin: 0 .5em (space after
0). Should UA interpret it as margin:0.5em or as margin: 0px 0.5em or
as an incorrect declaration? But of course W3C thought all detail to
the end I'm sure.



Reply With Quote
  #19  
Old   
Els
 
Posts: n/a

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 10:58 AM



VK wrote:

Quote:
It is getting more puzzling in a case like margin: 0 .5em (space after
0). Should UA interpret it as margin:0.5em or as margin: 0px 0.5em or
as an incorrect declaration?
Neither - they should interpret it as a correct declaration, meaning 0
margin for top and bottom, and a .5em margin for left and right.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

Now playing: Camel - Skylines


Reply With Quote
  #20  
Old   
VK
 
Posts: n/a

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 11:13 AM




Els wrote:
Quote:
VK wrote:

It is getting more puzzling in a case like margin: 0 .5em (space after
0). Should UA interpret it as margin:0.5em or as margin: 0px 0.5em or
as an incorrect declaration?

Neither - they should interpret it as a correct declaration, meaning 0
margin for top and bottom, and a .5em margin for left and right.
Are you referring to a relevant W3C specification or is it your own
interpretation of the sentence "After a '0' number, the unit identifier
is optional." ?

On practice yes, it works the way you suggested. Moreover margin:0. 5em
(space after period) sets left/right to 0px and top/bottom to 5em. A
very nice AI feature :-) though can be very far from the intended rule
(if an erroneus space).



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.