473,386 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Should li inherit margin style of ul?

I have a web page at http://www.architectqueensland.com/index.html
styled with http://www.architectqueensland.com/architect.css The site
is valid HTML 4.01 Strict. The CSS is valid 2.1 except for use of the
CSS3 text-shadow property.

The side navigation on the pages displays basically as expected in
Firefox, Opera and Safari. According to Browsershots, IE7 is also OK for
navigation. The desired appearance is as Safari does it (same
browsershots page)
http://browsershots.org/website/http...land.com/index.
html

However IE6 seems to put additional space between all li items.

I suspect this line in my CSS-
#side ul { list-style: none; margin: 170px 0 50px 0; padding: 0 0 0 1em;
}
which puts a space at the end of the ul to improve appearance.

http://www.w3.org/TR/REC-CSS1#inheritance seems to me to indicate that
li should not inherit this bottom margin.

Can anyone comment on what is happening with the navigation?

Also, for bonus points, in both IE6 and IE7, the text styled with
address { } shows up as a column of words, which was not what I intended
(I wanted a single line). I suspect I shouldn't have used float: left;
but I am not sure why the effect happens.

--
http://www.ericlindsay.com
Jan 9 '07 #1
12 5129
In article
<NO***********************************@freenews.ii net.net.au>,
Eric Lindsay <NO*************@ericlindsay.comwrote:
I have a web page at http://www.architectqueensland.com/index.html
styled with http://www.architectqueensland.com/architect.css The site
is valid HTML 4.01 Strict. The CSS is valid 2.1 except for use of the
CSS3 text-shadow property.

The side navigation on the pages displays basically as expected in
Firefox, Opera and Safari. According to Browsershots, IE7 is also OK for
navigation. The desired appearance is as Safari does it (same
browsershots page)
http://browsershots.org/website/http...land.com/index.
html

However IE6 seems to put additional space between all li items.
You have a very nervous css sheet Eric!

Why the useless

#side li { }

in your css, it may be causing trouble in IE6 but more likely
than not, the browser has different defaults. Look, why not first
try expressly setting the css for li (experiment to match how you
like it in anything, Safari will do). If it is then fine in IE,
good, if not, add a line to talk to just IE Win and alter the
figures for that browser.

--
dorayme
Jan 9 '07 #2
Eric Lindsay wrote:
>
http://www.architectqueensland.com/index.html
IE6 seems to put additional space between all li items.
It's a long-standing problem with IE. It gets confused with list items
containing <aelements that are display:block. There are various ways
around it, one of which is to add

zoom:1;

to the containing <liproperty list.
Also, for bonus points, in both IE6 and IE7, the text styled with
address { } shows up as a column of words, which was not what I intended
(I wanted a single line). I suspect I shouldn't have used float: left;
but I am not sure why the effect happens.
I haven't looked at your code very closely but IE6 isn't floating any of
the columns like you probably want, maybe because of:
#side ul { list-style: none; margin: 170px 0 50px 0; padding: 0 0 0 1em; }

Margins in px units don't play well with widths set in %. Besides, IE's
overflow behavior is broken, so it's probably expanding the container
whether you want it to or not.

--
Berg
Jan 9 '07 #3
Eric Lindsay a écrit :
[... http://www.architectqueensland.com/index.html ...]
The side navigation on the pages displays basically as expected in
Firefox, Opera and Safari. [...]
However IE6 seems to put additional space between all li items.

I suspect this line in my CSS-
#side ul { list-style: none; margin: 170px 0 50px 0; padding: 0 0 0
1em;
}
which puts a space at the end of the ul to improve appearance.
Ah, I think I remember that one. Excerpt from one of my stylesheets:

/* Workaround time: when faced with <li><span>...</span></li>, with
display:block for SPAN, IE doubles LI's line-height, unless a
border-bottom is set. */
* HTML .navbar UL LI {
border-bottom: 1px #eee solid;
}

I see you have made your A's (inside your LI's) displayed as blocks, so
it could be that. Since you use a solid background, adding a bottom
border (in #666) shouldn't be too visible a hack.
Also, for bonus points, in both IE6 and IE7, the text styled with
address { } shows up as a column of words, which was not what I
intended (I wanted a single line). I suspect I shouldn't have used
float: left; but I am not sure why the effect happens.
Possibly because you didn't specify a width for that float? I too see
no need for a float here, BTW ;-)

HTH,
--
Daniel Déchelotte
http://yo.dan.free.fr/
Jan 9 '07 #4
Bergamot wrote:
Eric Lindsay wrote:
>>
http://www.architectqueensland.com/index.html

I haven't looked at your code very closely but IE6 isn't floating any of
the columns like you probably want, maybe because of:
#side ul { list-style: none; margin: 170px 0 50px 0; padding: 0 0 0 1em; }
I take that back. It's the double margin float bug.
http://www.positioniseverything.net/...ed-margin.html

--
Berg
Jan 9 '07 #5
In article <50*************@mid.individual.net>,
Bergamot <be******@visi.comwrote:
Bergamot wrote:
Eric Lindsay wrote:
>
http://www.architectqueensland.com/index.html
I haven't looked at your code very closely but IE6 isn't floating any of
the columns like you probably want, maybe because of:
#side ul { list-style: none; margin: 170px 0 50px 0; padding: 0 0 0 1em; }

I take that back. It's the double margin float bug.
http://www.positioniseverything.net/...ed-margin.html
Thanks Bergamot, but I don't know about the double margin float bug.
Positioniseverything says "This bug only occurs when the float margin
goes in the same direction as the float and is trapped directly between
the float and the inside edge of the container box. "

That doesn't seem to me to be what is happening. Unless of course you
are seeing something that I am not.

I used the zoom: 1; trick to close up the li spacing, which I imagine
makes IE use HasLayout. That works in IE 5.5 and 6 (7 was already OK).
It does not work in IE 5.01, but I think if I can establish the problem
is in IE, then real minority IE users will just have to put up with bugs
(the architect uses Macintosh, and isn't real tolerant of IE anyhow).

--
http://www.ericlindsay.com
Jan 10 '07 #6
In article
<20**********************************@fr.club-internet.invalid>,
Daniel Déchelotte <ma**********@fr.club-internet.invalidwrote:
Eric Lindsay a écrit :
[... http://www.architectqueensland.com/index.html ...]
The side navigation on the pages displays basically as expected in
Firefox, Opera and Safari. [...]
However IE6 seems to put additional space between all li items.

I suspect this line in my CSS-
#side ul { list-style: none; margin: 170px 0 50px 0; padding: 0 0 0
1em;
}
which puts a space at the end of the ul to improve appearance.

Ah, I think I remember that one. Excerpt from one of my stylesheets:

/* Workaround time: when faced with <li><span>...</span></li>, with
display:block for SPAN, IE doubles LI's line-height, unless a
border-bottom is set. */
* HTML .navbar UL LI {
border-bottom: 1px #eee solid;
}

I see you have made your A's (inside your LI's) displayed as blocks, so
it could be that. Since you use a solid background, adding a bottom
border (in #666) shouldn't be too visible a hack.
Making the A's inside the LI's display as blocks gives anyone mousing a
larger (and more consistent) target, the whole size of the LI. I think
it is a reasonable use of display: block;

I didn't realise it might cause IE to double the LI line-height. I'm
going to have to write test cases to see whether the problem is
line-height doubling, or inheriting UL margins.

However I really don't like using a border bottom as a solution, even if
it is invisible. I used the zoom: 1; trick suggested by another poster,
which I imagine made IE use HasLayout. That worked on IE 5.5 and 6 (but
not 5.01). It is a lot clearer that this is a kluge for IE only, not
part of the layout.
Also, for bonus points, in both IE6 and IE7, the text styled with
address { } shows up as a column of words, which was not what I
intended (I wanted a single line). I suspect I shouldn't have used
float: left; but I am not sure why the effect happens.

Possibly because you didn't specify a width for that float? I too see
no need for a float here, BTW ;-)
Not sure why I would need to add a width. Wouldn't address default to
100% of viewpoint, if it didn't inherit a width from elsewhere?

I have realised the float got in there when I added float to the footer,
which seemed to be needed to get around another rendering problem. I
need to go back over footer and try to find out why I needed it in the
first place.

--
http://www.ericlindsay.com
Jan 10 '07 #7
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article
<NO***********************************@freenews.ii net.net.au>,
Eric Lindsay <NO*************@ericlindsay.comwrote:
I have a web page at http://www.architectqueensland.com/index.html
styled with http://www.architectqueensland.com/architect.css The site
is valid HTML 4.01 Strict. The CSS is valid 2.1 except for use of the
CSS3 text-shadow property.

The side navigation on the pages displays basically as expected in
Firefox, Opera and Safari. According to Browsershots, IE7 is also OK for
navigation. The desired appearance is as Safari does it (same
browsershots page)
http://browsershots.org/website/http...land.com/index.
html

However IE6 seems to put additional space between all li items.

You have a very nervous css sheet Eric!

Why the useless

#side li { }

in your css, it may be causing trouble in IE6 but more likely
than not, the browser has different defaults. Look, why not first
try expressly setting the css for li (experiment to match how you
like it in anything, Safari will do). If it is then fine in IE,
good, if not, add a line to talk to just IE Win and alter the
figures for that browser.
But LI is already fine in Safari (and is also fine in every Linux
browser in Broswershots). It is only IE below 7 that has problems.

The CSS started out as an entirely different site I did earlier (which
started as something even earlier on my site, etc., etc.) I was planning
to leave redoing the CSS until I got all the text and photos into clean
HTML. I was actually hoping to get all the text and photos before I
applied any CSS at all, to avoid distracting the people supplying the
photos with appearance. But life got in the way of timely changes.

If you look at stuff commented out in the CSS, you will see lots of
stuff that doesn't exist in the HTML. I will clean it all out, I promise.

What I should do is a whole bunch of standard CSS templates, ready for
next time. With a separate file for IE patches.

--
http://www.ericlindsay.com
Jan 10 '07 #8
Eric Lindsay wrote:
In article <50*************@mid.individual.net>,
Bergamot <be******@visi.comwrote:
Eric Lindsay wrote:

http://www.architectqueensland.com/index.html
It's the double margin float bug.

you are seeing something that I am not.
IE6: http://www.bergamotus.ws/screenshots...queensland.png

--
Berg
Jan 10 '07 #9
In article
<NO***********************************@freenews.ii net.net.au>,
Eric Lindsay <NO*************@ericlindsay.comwrote:
#side li { }

in your css, it may be causing trouble in IE6 but more likely
than not, the browser has different defaults. Look, why not first
try expressly setting the css for li (experiment to match how you
like it in anything, Safari will do). If it is then fine in IE,
good, if not, add a line to talk to just IE Win and alter the
figures for that browser.

But LI is already fine in Safari (and is also fine in every Linux
browser in Broswershots). It is only IE below 7 that has problems.
Well, this is what I had in mind when saying you might talk to IE
Win separately for the li css margins and paddings. Remember to
put this talk subsequent in the order of the css that all
browsers see. This way, all will be fine for non iE, and IE will
simply follow the latest css for li which it sees. Do you need
help re talking to IE only?

--
dorayme
Jan 10 '07 #10
In article <50*************@mid.individual.net>,
Bergamot <be******@visi.comwrote:
Eric Lindsay wrote:
In article <50*************@mid.individual.net>,
Bergamot <be******@visi.comwrote:
Eric Lindsay wrote:

http://www.architectqueensland.com/index.html

It's the double margin float bug.
you are seeing something that I am not.

IE6: http://www.bergamotus.ws/screenshots...queensland.png
Well that is certainly an interesting result. IE6 deciding there isn't
space for the float.

The images from browsershots didn't show that.

Thanks very much. Maybe if I remove my margins and use pad instead - or
since the LI are single line, maybe text-indent. Guess I will experiment.

--
http://www.ericlindsay.com
Jan 11 '07 #11
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article
<NO***********************************@freenews.ii net.net.au>,
Eric Lindsay <NO*************@ericlindsay.comwrote:
#side li { }
>
in your css, it may be causing trouble in IE6 but more likely
than not, the browser has different defaults. Look, why not first
try expressly setting the css for li (experiment to match how you
like it in anything, Safari will do). If it is then fine in IE,
good, if not, add a line to talk to just IE Win and alter the
figures for that browser.
But LI is already fine in Safari (and is also fine in every Linux
browser in Broswershots). It is only IE below 7 that has problems.

Well, this is what I had in mind when saying you might talk to IE
Win separately for the li css margins and paddings. Remember to
put this talk subsequent in the order of the css that all
browsers see. This way, all will be fine for non iE, and IE will
simply follow the latest css for li which it sees. Do you need
help re talking to IE only?
The major problem I see is that I am really sick and tired of working
around IE problems. I don't want to use conditional comments on my web
pages, if I can possibly avoid it. I'll just see how close to what I
want I can go without real kluges. Thanks.

--
http://www.ericlindsay.com
Jan 11 '07 #12
In article
<NO***********************************@freenews.ii net.net.au>,
Eric Lindsay <NO*************@ericlindsay.comwrote:
But LI is already fine in Safari (and is also fine in every Linux
browser in Broswershots). It is only IE below 7 that has problems.
Well, this is what I had in mind when saying you might talk to IE
Win separately for the li css margins and paddings. Remember to
put this talk subsequent in the order of the css that all
browsers see. This way, all will be fine for non iE, and IE will
simply follow the latest css for li which it sees. Do you need
help re talking to IE only?

The major problem I see is that I am really sick and tired of working
around IE problems. I don't want to use conditional comments on my web
pages, if I can possibly avoid it. I'll just see how close to what I
want I can go without real kluges. Thanks.
I know the feeling Eric! But really, don't hamstring yourself, it
is simple enough to do and IE 6 will not be around for ever.
There is nothing morally wrong with it. <g>

--
dorayme
Jan 11 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Eric Osman | last post by:
I know that if I want all my table entries to be of height 25, I can put this in my style file: table tr td {height:25} But what if I want the above to only apply to a particular table ? ...
2
by: tomasio | last post by:
Dear Group, I recently experienced a strange behaviour on firefox 0.9.2 (OS: winxp prof. SP1): the div.Footnote (see code on http://tomasio.laudatio.com/jobs/Claudia/Website/stylesheet.css ) is...
9
by: Chandy | last post by:
Hi, Is there any way to apply a style that will effectively block the application of any applied or inherited styles for that object and any contained objects? E.g., CSS: P {backgro...}
15
by: matko | last post by:
Hi! In one of the two examples for the PaintEventArgs.Graphics-property (in the VS 2005 documentation), the Graphics-object is "saved" to a local variable, before being used. In the other...
4
by: Schraalhans Keukenmeester | last post by:
I recently discovered the value of tidy for my html adventures. Nice little app. Only one thing is becoming a bit of a drag. If I use tidy to clean up my code, it inserts the following in every...
1
by: =?Utf-8?B?SmltSGVhdmV5?= | last post by:
If I create a <divand specify that I want the font-size to be 1.2em for instance, why do the <asp:controls not follow this rule if they are contained within the <divstatement? How/what do I need...
2
by: GTalbot | last post by:
Hello fellow comp.infosystems.www.authoring.stylesheets colleagues, Imagine this situation: #grand-parent-abs-pos { height: 400px; position: absolute; width: 600px; }
8
by: Jordyn Burdick | last post by:
I'm in the process of debugging my cross browser discrepancies for a website. It shows up perfect in Chrome and Safari, looks horrible in IE but only has ONE error in Firefox. I thought it would be...
3
by: sidhx | last post by:
hey i am just beginner in CSS.I have attached the screen shoot. In this the Left-side inherit height of the main content but when i try to inherit for Right-side it don't work help me. This is the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
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,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.