473,396 Members | 2,102 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,396 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 1960
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...

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.