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
  #21  
Old   
VK
 
Posts: n/a

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







Alan Silver wrote:
Quote:
In article <r4o152ploq1fegoviaoes547jfkt3aodv3 (AT) 4ax (DOT) com>, Ken Loomis
not_a_real_email (AT) address (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.

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 bet margins or padding were not set to 0. width:100% works reliably
for W3C box only with zero margin/paddings, otherwise your layout easy
goes to trash (or an additional wrapping box is needed).



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

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







Alan Silver wrote:
Quote:
In article <r4o152ploq1fegoviaoes547jfkt3aodv3 (AT) 4ax (DOT) com>, Ken Loomis wrote:
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.

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
Of course it works - looks very nice btw. To experience the troubles of
Ken Loomis, simply set top/left margin or padding (yours to choose) to
say 5px while still having width:100%
W3C Box falls apart right away: you need extra wrapper for LI's now.



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

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



VK wrote:

Quote:
Els wrote:
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." ?
It is neither. I am not referring to anything, other than general CSS
rules for shorthand declarations: one space between each component.
Hence, a space after a 0, means the 0 has finished. I don't need
specific W3C specifications related to optional unit identifiers for
that.

Quote:
On practice yes, it works the way you suggested.
Of course it does. I always write my style rules like that, entirely
on purpose.

Quote:
Moreover margin:0. 5em
(space after period) sets left/right to 0px and top/bottom to 5em.
Likely the reverse: 0 margin top and bottom (0. = 0.0 = 0 = 0px = 0em
= 0 anything), and 5em left and right.

Quote:
A very nice AI feature :-)
AI as in... ?? Not anything with intelligence, is it? ;-)

Quote:
though can be very far from the intended rule
(if an erroneus space).
*Anything* can be very far from what was intended when errors have
been made.

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

Now playing: Rush - Dreamline


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

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 12:05 PM



In article <1146153707.794757.222890 (AT) y43g2000cwc (DOT) googlegroups.com>, VK
<schools_ring (AT) yahoo (DOT) com> writes
Quote:
Alan Silver wrote:
In article <r4o152ploq1fegoviaoes547jfkt3aodv3 (AT) 4ax (DOT) com>, Ken Loomis
not_a_real_email (AT) address (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.

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 bet margins or padding were not set to 0. width:100% works reliably
for W3C box only with zero margin/paddings, otherwise your layout easy
goes to trash (or an additional wrapping box is needed).
Dunno, the page I posted had margins all set to zero. I had done that
early on to try and eliminate a problem with IE adding extra space
between the links.

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


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

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



In article <1146155196.010346.40420 (AT) i39g2000cwa (DOT) googlegroups.com>, VK
<schools_ring (AT) yahoo (DOT) com> writes
Quote:
Alan Silver wrote:
In article <r4o152ploq1fegoviaoes547jfkt3aodv3 (AT) 4ax (DOT) com>, Ken Loomis wrote:
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.

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

Of course it works - looks very nice btw. To experience the troubles of
Ken Loomis, simply set top/left margin or padding (yours to choose) to
say 5px while still having width:100%
W3C Box falls apart right away: you need extra wrapper for LI's now.
Oh I see. I thought the problem was with my page as I had it. I would
have thought that having a width of 100% and a non-zero margin was
asking for trouble as it adds up to more than 100%.

Ta ra

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


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

Default Re: Why does IE add a pixel of white space around my links? - 04-27-2006 , 12:08 PM



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

Quote:
In article <r4o152ploq1fegoviaoes547jfkt3aodv3 (AT) 4ax (DOT) com>, Ken Loomis
not_a_real_email (AT) address (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.

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.

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.
OK, you put width:100% in the <h3> too. That fixed it for me.

Ken


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.