473,573 Members | 3,265 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Horiz. navigation ul problem in IE

Hey everyone.

First the requisite links:

site: http://www.joshrenaud.com/bodies/index.html
css: http://www.joshrenaud.com/bodies/stylesheets/style.css

I have a UL that I'm using for a horizontal navigation bar on a website. It
looks decent in most browsers I've checked, except for IE5.

In IE5, the links break and wrap onto a second line. But the links on the
second line overlap the upper ones.

In what is probably a related problem, I've also noticed that the navigation
bar seems to float up too high, touching the top of the page. Other browsers
(Safari, Netscape, etc) don't do this. The margin isn't set on the nav bar
itself (#MainContent ul#Menu) but on the parent div (#MainContent).

Can anyone suggest solutions to either of these problems (or a solution for
them both?)

Thanks for any help anyone can offer.

--Josh

Jul 20 '05 #1
10 2999
Josh Renaud wrote:
Hey everyone.

First the requisite links:

site: http://www.joshrenaud.com/bodies/index.html
css: http://www.joshrenaud.com/bodies/stylesheets/style.css
Yes, but that's not your only style. You might have saved me a lot of
time by mentioning

http://www.joshrenaud.com/bodies/sty...ts/styleNN.css
There's something I don't quite get. From style.css:

* html div#LeftSidebar {
position: absolute; /* property for IE5.x/PC */
p\osition: absolute; /* property for IE6/PC, IE5/Mac */
}

I don't see what that accomplishes. You've set the same value in both
properties. Why do you need them both? And you also set that value in
sytleNN.css.

div#LeftSidebar {
position: fixed; /* property for other browsers */
}

This will do nothing in conforming browsers. Because

* html div#LeftSidebar

has greater weight than

div#LeftSidebar

the value for the first selector will always be used. If you want some
browsers to use position: fixed, you need to change the css.

#MainContent ul#Menu li a:link { color: #933; }
#MainContent ul#Menu li a:visited { color: #933; }

NB: You should always set both color and background color (or set
neither) at every level of specificity.
I have a UL that I'm using for a horizontal navigation bar on a website. It
looks decent in most browsers I've checked, except for IE5.

In IE5, the links break and wrap onto a second line. But the links on the
second line overlap the upper ones.
Ditto for IE 5.5/Win. :( I cannot figure out what's wrong by looking
at the code. I'll confess I'm having a hard time processing the 2
stylesheets because they have so much overlapping material.

#MainContent {
width: 460px;

Ugh! Width fixed in pixels. This is bad practice. I wanted to test
IE/Win at wider widths, but the fixed width of content made that all but
impossible. Change the width to em units. Find a value that approximates
what you have now. Then, increase the width, and see if that changes the
behavior of the menu.

Other issues.

I looked at the HTML. Why do you use any positioning at all? It looks
like you can simply float the sidebar left. BTW,

<img src="graphics/logo.gif" alt="logo" />

alt="logo" does not help Googlebot much, nor a text browser. The alt
should be empty (but not removed).

<img src="graphics/logo.gif" alt="" />

On the same topic, your photo of the instructor is missing the alt
attribute. Add alt="" to the tag.
In what is probably a related problem, I've also noticed that the navigation
bar seems to float up too high, touching the top of the page.


This one's got me stumped at the moment. I'll reply again if I figure it
out, but you may want to simplify things on your end before continuing.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2
Josh Renaud wrote:
Hey everyone.

First the requisite links:

site: http://www.joshrenaud.com/bodies/index.html
css: http://www.joshrenaud.com/bodies/stylesheets/style.css
Yes, but that's not your only style. You might have saved me a lot of
time by mentioning

http://www.joshrenaud.com/bodies/sty...ts/styleNN.css
There's something I don't quite get. From style.css:

* html div#LeftSidebar {
position: absolute; /* property for IE5.x/PC */
p\osition: absolute; /* property for IE6/PC, IE5/Mac */
}

I don't see what that accomplishes. You've set the same value in both
properties. Why do you need them both? And you also set that value in
sytleNN.css.

div#LeftSidebar {
position: fixed; /* property for other browsers */
}

This will do nothing in conforming browsers. Because

* html div#LeftSidebar

has greater weight than

div#LeftSidebar

the value for the first selector will always be used. If you want some
browsers to use position: fixed, you need to change the css.

#MainContent ul#Menu li a:link { color: #933; }
#MainContent ul#Menu li a:visited { color: #933; }

NB: You should always set both color and background color (or set
neither) at every level of specificity.
I have a UL that I'm using for a horizontal navigation bar on a website. It
looks decent in most browsers I've checked, except for IE5.

In IE5, the links break and wrap onto a second line. But the links on the
second line overlap the upper ones.
Ditto for IE 5.5/Win. :( I cannot figure out what's wrong by looking
at the code. I'll confess I'm having a hard time processing the 2
stylesheets because they have so much overlapping material.

#MainContent {
width: 460px;

Ugh! Width fixed in pixels. This is bad practice. I wanted to test
IE/Win at wider widths, but the fixed width of content made that all but
impossible. Change the width to em units. Find a value that approximates
what you have now. Then, increase the width, and see if that changes the
behavior of the menu.

Other issues.

I looked at the HTML. Why do you use any positioning at all? It looks
like you can simply float the sidebar left. BTW,

<img src="graphics/logo.gif" alt="logo" />

alt="logo" does not help Googlebot much, nor a text browser. The alt
should be empty (but not removed).

<img src="graphics/logo.gif" alt="" />

On the same topic, your photo of the instructor is missing the alt
attribute. Add alt="" to the tag.
In what is probably a related problem, I've also noticed that the navigation
bar seems to float up too high, touching the top of the page.


This one's got me stumped at the moment. I'll reply again if I figure it
out, but you may want to simplify things on your end before continuing.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #3
On Sat, 17 Apr 2004 14:05:32 -0400, Brian
<us*****@juliet remblay.com.inv alid> wrote:

(quoted CSS)

* html div#LeftSidebar {

Apologies if I'm way off, and feel free to dope-slap me if I am, but does
this make sense? I read this as selecting the id'ed div if it is a
descendant of html if html is a descendant of any element. But html, being
the root element, is never a descendant of any element. Should this be
legal?
Jul 20 '05 #4
On Sat, 17 Apr 2004 14:05:32 -0400, Brian
<us*****@juliet remblay.com.inv alid> wrote:

(quoted CSS)

* html div#LeftSidebar {

Apologies if I'm way off, and feel free to dope-slap me if I am, but does
this make sense? I read this as selecting the id'ed div if it is a
descendant of html if html is a descendant of any element. But html, being
the root element, is never a descendant of any element. Should this be
legal?
Jul 20 '05 #5
Neal wrote:
On Sat, 17 Apr 2004 14:05:32 -0400, Brian
<us*****@juliet remblay.com.inv alid> wrote:

(quoted CSS)

* html div#LeftSidebar {

Apologies if I'm way off, and feel free to dope-slap me if I am, but does
this make sense? I read this as selecting the id'ed div if it is a
descendant of html if html is a descendant of any element. But html, being
the root element, is never a descendant of any element. Should this be
legal?


Some versions of Internet Explorer have a "phantom" element outside of the
root element, so this is a simple way of providing styles just for them. A
quick browse of the various CSS filter sites should tell you exactly which
versions this applies to (I suspect 5.0+ on Windows).

It's syntactically correct (remember, CSS isn't only used with HTML),
however it cannot select any elements in a conforming browser when applied
to an HTML document.

--
Jim Dabell

Jul 20 '05 #6
Neal wrote:
On Sat, 17 Apr 2004 14:05:32 -0400, Brian
<us*****@juliet remblay.com.inv alid> wrote:

(quoted CSS)

* html div#LeftSidebar {

Apologies if I'm way off, and feel free to dope-slap me if I am, but does
this make sense? I read this as selecting the id'ed div if it is a
descendant of html if html is a descendant of any element. But html, being
the root element, is never a descendant of any element. Should this be
legal?


Some versions of Internet Explorer have a "phantom" element outside of the
root element, so this is a simple way of providing styles just for them. A
quick browse of the various CSS filter sites should tell you exactly which
versions this applies to (I suspect 5.0+ on Windows).

It's syntactically correct (remember, CSS isn't only used with HTML),
however it cannot select any elements in a conforming browser when applied
to an HTML document.

--
Jim Dabell

Jul 20 '05 #7
On Sat, 17 Apr 2004 20:03:55 +0100, Jim Dabell <ji********@jim dabell.com>
wrote:
Neal wrote:
* html div#LeftSidebar {

But html, being
the root element, is never a descendant of any element. Should this be
legal?


Some versions of Internet Explorer have a "phantom" element outside of
the
root element, so this is a simple way of providing styles just for them.


Interesting. Thanks for this explanation. It could prove useful.
Jul 20 '05 #8
On Sat, 17 Apr 2004 20:03:55 +0100, Jim Dabell <ji********@jim dabell.com>
wrote:
Neal wrote:
* html div#LeftSidebar {

But html, being
the root element, is never a descendant of any element. Should this be
legal?


Some versions of Internet Explorer have a "phantom" element outside of
the
root element, so this is a simple way of providing styles just for them.


Interesting. Thanks for this explanation. It could prove useful.
Jul 20 '05 #9
Neal wrote:
Brian wrote:

* html div#LeftSidebar {


I read this as selecting the id'ed div if it is a descendant of html
if html is a descendant of any element. But html, being the root
element, is never a descendant of any element.


Oops. That one got right by me. The op's css included a commented link
explaining it; I should have read it before replying. After reading Jim
Dabell's post in this thread, I now see that it is some way to fool some
version of MSIE/Win.

Obviously, that part of my reply about selector weight should only be
considered in light of Neal and Jim Dabell's additions/corrections.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #10

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

Similar topics

0
707
by: Josh Renaud | last post by:
Hey everyone. First the requisite links: site: http://www.joshrenaud.com/bodies/index.html css: http://www.joshrenaud.com/bodies/stylesheets/style.css I have a UL that I'm using for a horizontal navigation bar on a website. It looks decent in most browsers I've checked, except for IE5.
0
2116
by: Veli-Pekka Tätilä | last post by:
Hi, My first post here. I've found some serious accessibility flaws in the Python 2.4 docs and wish they could be rectified over time. I'm very new to Python and initially contacted docs at python org, However, I haven't gotten a reply for a week or so, and figured out I could post here for a larger audience, then. Original message...
1
3541
by: Robert Neville | last post by:
I am having some trouble with some old code revolving around custom form navigation buttons. My main form has a sub-form with these custom navigation buttons. In other words, the code should be modular and work across forms and sub-forms. My previous code was taken from the Access Expert Solutions 97 (Leszynski) many years ago. As my database...
4
3025
by: Sandy.Pittendrigh | last post by:
I don't want to get into a frames discussion here. We all know they have numerous drawbacks, especially with search engine visibility. (Google, ironically, uses framesets for displaying individual news group posts). Despite the trouble they cause, it is still tempting to use frames, occasionally, for instance for machine-generated pages...
28
2659
by: laredotornado | last post by:
Hi, Surprisingly, I can't get the drop down menus to work on PC IE 6. If you roll over "PRODUCTS", normally a drop down menu appears (on Safari and Firefox), but on PC IE, nada. http://test2.boxxtech.com/corporate/test.asp Any ideas? Thanks, - Dave
3
2505
by: Paul | last post by:
I want the <div id="navigation"column to be the same color all the way to the bottom. The "background-image: url(bg_menu_tile.gif);" was a try to force it with a long 1-pixel graphic - didn't work. Any ideas? Here's the HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>...
10
2530
by: EA | last post by:
I am sure I must be missing something about building navigation bars with CSS. Yes it is a very clever and efficient way to format navigation structures on simple one navigation level webs, i.e. six buttons which when clicked go to a separate web page. But here is where I must be missing something, am I right in thinking that if you wish...
1
1460
by: quartzy | last post by:
I have a strict doc type: However, I am still unsure about css. Problems I have now are to do with floating both navigation lists. I have used tables and divs, as layouts are just too difficult for me to take on right now, but maybe this is causing problems. The left navigation does not sit right ie flush to the left of the page. The top...
0
1948
by: emalcolm_FLA | last post by:
Hello and TIA for your consideration. I have created several db's for a non-profit and they want custom navigation buttons to display "You are on the first record, last record, etc". With this ng help I've created code for all except the add new record command button. If I create individual sub functions behind each form, no problem. ...
0
1898
by: tom59593 | last post by:
Hi there. I have been attempting (for a few days on end, sadly) to get a navigation section of my new site to work. Granted, this is the first time I've ever written CSS...although I had PLENTY of practice using tables...tee hee. Anyways, this should be EXTREMELY simple...as I want NO rollovers, no fancy hovers, no current-page...
0
7779
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, 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...
0
7693
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8021
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, 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. ...
0
8202
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7781
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5291
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3732
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...
0
3732
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1040
bsmnconsultancy
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...

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.