Hello,
Here I am again with another "why does IE do that" question!!
Please have a look at http://www.kidsinaction.org.uk/fd/homepage.html
and see if you can work out why IE adds a one pixel white space on the
left and right side of the links with the light-green backgrounds. It
doesn't do it on the header links, which have darker green backgrounds.
FF and Opera don't add the pixel at all, which is what I would expect as
I set left and right margins to zero for all relevant elements.
Any suggestions? TIA
--
Alan Silver
(anything added below this line is nothing to do with me)
Apr 26 '06
28 1950
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.
--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Now playing: Camel - Skylines
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." ?
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).
Alan Silver wrote: In article <r4************ *************** *****@4ax.com>, Ken Loomis <no************ **@address.com> writesMust 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).
Alan Silver wrote: In article <r4************ *************** *****@4ax.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.
VK wrote: 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.
On practice yes, it works the way you suggested.
Of course it does. I always write my style rules like that, entirely
on purpose.
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.
A very nice AI feature :-)
AI as in... ?? Not anything with intelligence, is it? ;-)
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
On Thu, 27 Apr 2006 16:53:32 +0100, Alan Silver
<al*********@no spam.thanx.inva lid> wrote: In article <r4************ *************** *****@4ax.com>, Ken Loomis <no*********** ***@address.com > writesMust 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
Alan Silver wrote: In article <11************ **********@u72g 2000cwu.googleg roups.com>, VK <sc**********@y ahoo.com> writes By setting width:100% for LI elements eliminates the gaps.
Thanks, that was the simplest solution.
That does not, however, let you specify padding or borders along with
it, and still get a consistent result across browsers.
For IE work-arounds, not much beats the zoom property. It whips IE
into shape and other browsers ignore it. Who cares that it's
non-standard when it does so much good?
--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
In article <11************ *********@i39g2 000cwa.googlegr oups.com>, VK
<sc**********@y ahoo.com> writes Alan Silver wrote: In article <r4************ *************** *****@4ax.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)
In article <11************ **********@y43g 2000cwc.googleg roups.com>, VK
<sc**********@y ahoo.com> writes Alan Silver wrote: In article <r4************ *************** *****@4ax.com>, Ken Loomis <no************ **@address.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) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: StopBsod |
last post by:
Hello group,
I use XSLT to output a unix shell script based on the content of an XML
file :
The XSLT :
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"/>
<xsl:template name="haut" match="/rhythmdb">
|
by: Stephen Poley |
last post by:
People in these groups, and on web-pages, not infrequently suggest that
it is worthwhile cutting down on white-space and comments in HTML and
CSS in order to reduce loading times. I and others have more than once
doubted this, given the data-compression in the HTTP protocol. Having
seen it suggested again a couple of times in the last few days, I
decided it was time for a test on the effect of white-space.
I took one of my pages:...
|
by: Kor |
last post by:
Hi,
Does anybody understand why the technique described in
http://www.macromedia.com/devnet/server_archive/articles/css_positioning_dynamic_repositioning.html
doesnt work in Netscape 6/7 and Mozilla? I tried it out but to no
avail. I am certainly not a (javascript) programmer / DOM expert but
it seems to me it should work (see for example
http://www.quirksmode.org/dom/w3c_html.html )
|
by: Prince |
last post by:
I have some <RequiredFieldValidator> on my page and
everything works fine except that there are lots of white
spaces between the web server controls that are being
validated. I've set the Display properties for all the
controls to "Dynamic" and still I can't get rid of the
white spaces between controls. It's as if there are
bunch of <br> tags separating the controls.
For example,the "HTML" look similar to this.
|
by: Harlan Messinger |
last post by:
What rules deal with attribute values with trailing spaces, or tags or
attribute values with embedded newlines? Examples below: the HREF with
embedded newline, the SRC with trailing spaces, and IMG tag spread over
multiple lines.
<a href="myself.html
">
<img src="/images/picture.gif " width="80"
height="65"
alt="What, me worry?"></a>
| |
by: Johny |
last post by:
I use PIL to write some text to a picture.The text must be seen wery
clearly.
I write the text to different pictures but to the same position. As
pictures maybe different, colour, in the position where I write the
text, is also different.
Is there a way how to set the font colour so that it will be seen very
clearly in the picture?
For example, if the picture is bright ( for example yellow), the font
colour should be dark( e.g. black)...
|
by: Agix |
last post by:
Hi there,
Please check out : http://clarifysolutions.co.uk/certenroll/
The source is included below. This page is a test, so I can play about
with paddings, margins and layouts using divs as semantically
meaningless containers for bunch's of other elements - like everyone
keeps telling me to make my code standards compliant.
This request is not because I want a fix, but because I want to
|
by: tharden3 |
last post by:
How do I remove white space around an icon? I have been using some helpful icon pics from google images to spice up a website that I'm making. In many instances though, the icon is not square, but irregularly shaped, leaving white space to make a square around the icon. In one case, I was using a 16 x 16 gif image of a movie reel (a round object) but I could not get rid of the white space around the object. How can I do this?
|
by: ofiras |
last post by:
In bitmap, how can I find the nearest pixel (pixel
1) to a specific pixel (pixel 2) that has different color from pixel
2? Or how can I find a pixel in a specific distance from pixel 2 (like
a circle that pixel 2 is his center, and I'm looking for a pixel that
has different color that pixel 2)?
(I'm trying to do a voronoi diagram maker, so I need to search for the
nearest colored pixel in my bitmap for every pixel that is not colored...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |