472,958 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

CSS Horizontal inline navigation not working correctly in IE but is in Firefox

3
Hi,

i've been stuck trying to get the following code to display correctly in IE in which i've come across many diffrent theories but none which have worked possibly the box model problem.

************************************************** **************************
BEGIN
************************************************** **************************
[html]
<HTML>
<HEAD>
<style type="text/css">

/*Nav bar styles*/

ul.nav,
.nav ul{
margin: 0;
padding: 0;
cursor: default;
list-style-type: none;
display: inline;
}

ul.nav{
display: table;
}

ul.block{
width: 100%;
table-layout: fixed;
}

ul.nav>li{
display: table-cell;
position: relative;
padding: 2px 6px;
}
/*
ul.nav>li:hover{
padding-right: 1px;
}*/

ul.nav li>ul{
display: none;
position: absolute;
max-width: 40ex;
margin-left: -6px;
margin-top: 2px;
}

ul.nav li:hover>ul{
display : block;
}

.nav ul li a{
display: block;
padding: 2px 10px;
}

/*Menu styles*/

ul.nav,
.nav ul,
.nav ul li a{
background-color: #fff;
color: #369;
}

ul.nav li:hover,
.nav ul li a:hover{
background-color: #369;
color: #fff;
}

ul.nav li:active,
.nav ul li a:active{
background-color: #036;
color: #fff;
}

ul.nav,
.nav ul{
border: 1px solid #369;
}

.nav a{
text-decoration: none;
}


</STYLE>

</HEAD>

<BODY>

<ul class="nav">

<li><strong>Browsers</strong>
<ul>
<li><a href="http://mozilla.org/">Mozilla</a></li>
<li><a href="http://mozilla.org/products/firefox/">Firefox</a></li>
<li><a href="http://mozilla.org/products/camino/">Camino</a></li>
<li><a href="http://kmeleon.sourceforge.net/">K-meleon</a></li>
<li><a href="http://galeon.sourceforge.net/">Galeon</a></li>
<li><a href="http://netscape.com/">Netscape</a></li>
<li><a href="http://microsoft.com/">Internet Explorer</a></li>

<li><a href="http://opera.com/">Opera</a></li>
<li><a href="http://apple.com/safari/">Safari</a></li>
<li><a href="http://konqueror.org/">Konqueror</a></li>
</ul></li>
<li><strong>Web Design</strong>
<ul>
<li><a href="http://w3.org/">W3C</a></li>
<li><a href="http://alistapart.com/">A List Apart</a></li>
<li><a href="http://meyerweb.com/eric/css/edge/">css/edge</a></li>
<li><a href="http://mako4css.com/">MaKo 4 CSS</a></li>

<li><a href="http://glish.com/css/">CSS Layout Techniques</a></li>
<li><a href="http://realworldstyle.com/">Real World Style</a></li>
<li><a href="http://css-discuss.org/">css-discuss</a></li>
<li><a href="http://css.nu/">CSS Pointers Group</a></li>
</ul>
</li>
<li><strong>Search Engines</strong>
<ul>
<li><a href="http://google.com/">Google</a></li>
<li><a href="http://dmoz.org/">Open Directory</a></li>

<li><a href="http://yahoo.com/">Yahoo!</a></li>
<li><a href="http://alltheweb.com/">All The Web</a></li>
<li><a href="http://teoma.com/">Teoma</a></li>
<li><a href="http://wisenut.com/">Wisenut</a></li>
</ul>
</UL>

</BODY>

</HTML>
[/html]
************************************************** *********************************
END
************************************************** *********************************

Any ideas?

Regards
Dec 3 '07 #1
5 1943
drhowarddrfine
7,435 Expert 4TB
First quick observation. You will never get IE to attempt to act like other modern browsers without a proper doctype. See the article about doctypes under Howtos above.
Dec 3 '07 #2
Awok
3
Ok,

thanks for the quick response and i've read through here
http://www.thescripts.com/forum/thread641513.html
and attached the following

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Regards
Dec 3 '07 #3
drhowarddrfine
7,435 Expert 4TB
I'm just doing "fly-by" looks at this.
Only modern browsers allow "hover" on all elements. That leaves IE out which only understand hover on <a>
Dec 3 '07 #4
Awok
3
OK, i'll look for another way to show a horizontal nav bar which works across multiple browsers

Cheers
Dec 3 '07 #5
Death Slaught
1,137 1GB
Here's one.

[HTML]<html>

<head>
<style type="text/css">

#navagation {
position:absolute;
}

ul {
width:100%;
float:left;
margin:0;
padding:0;
}

a {
float:left;
padding:0.2em 0.6em;
text-decoration:none;
color:#000;
background-color:#fff;
border:1px solid #000;
}

a:hover {
color:#fff;
background-color:#000;
border:1px solid #fff;
}

li {
display:inline;
}

</style>
</head>

<body>
<div id="navagation">

<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
<li><a href="#">Link 5</a></li>
</ul>

</div>
</body>

</html>[/HTML]

Hope it helps, Thanks, Death
Dec 3 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Randall Sell | last post by:
Hmmm, have now spent a day reading the entire web with no answer yet! so now resorting again to the experts... I'm trying to create a horizontal list. This is easy enough doing: <html> <head>...
7
by: addled | last post by:
Hi there, after reading posts here for a few months, I've built the courage to see if someone can see where I"m going wrong in the webpage I've been working on. In particular the horizontal nav...
7
by: Lachlan Hunt | last post by:
Hi, In the "Firefox 5 Minute Challenge" that I'm trying to write the stylesheet for, the height of language bar needs controlled by the height of the content, so that if the window is not wide...
0
by: thulsey | last post by:
Hi all, I've got some strange behavior happening in Firefox and Safari (Khtml and Gecko) that displays *almost* fine in IE6.0 (still trying to get pixels to line up, anal anal anal...) To...
2
by: Griff | last post by:
What I'm trying to achieve is to have a title followed by a horizontal rule on the same line. For example: Living on Mars ---------------- Living on Mars would be at best impractical for the...
0
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...
2
by: pbd22 | last post by:
Hi. I am trying to make a horizontal list that counts (downward) and a horizontal list that illustrates the time. Both list should be formatted the same (except for the nomenclature). I seem to...
4
by: =?ISO-8859-1?Q?Fran=E7ois_de_Dardel?= | last post by:
Here is the page: http://dardel.info/museum/Museum1.html and here is the CSS (see navigation buttons at bottom of file): http://dardel.info/museum/style3.css Is there a way to make all nav...
19
by: Jim | last post by:
Hi, I have two questions/problems pertaining to CSS horizontal dropdown menus and am hoping that someone here can help me out. (1) I'm having a problem centering the menu. I picked up the...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.