Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-11-2009, 04:30 PM   PM User | #1
salmansohail
New to the CF scene

 
Join Date: Nov 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
salmansohail is an unknown quantity at this point
IE6 CSS menu block bottom is shorter than actual menu height

Hi,

I written some CSS it works fine except in IE6 the visit page highlight block is not covering the entire height of my menu bar, here is the code:

Code:
/** Style for menu starts here */

#menu {
width: 800px;
height: 50px;
margin: 0px auto;
background: #264779;
}

#menu ul {
margin: 0px;
padding: 0 0 0 10px;
list-style: none;
}

#menu li {
display: inline;
}

#menu a {
display: block;
float: left;
padding: 14px 30px 10px 8px;
text-decoration: none;
color: #FFFFFF;
}

#menu a:hover {
color: #D7D7BD;
}


body#home a#homenav,
body#errorlogs a#errornav
{
color: #fff;
background: #FFC109; /**Yellow*/
font-weight: bold;
margin: 0px auto;
padding: 14px 20px 10px 20px;
text-decoration: none;
}
What is happening here is: the visit page highlight the respective menu but height of the menu block, is about 10px shorter than the height of the actual menu bar.
salmansohail is offline   Reply With Quote
Old 11-11-2009, 04:34 PM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
here is the code:
Could you please post a link to your page?
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 11-11-2009, 05:42 PM   PM User | #3
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello salmansohail,
I put it in an .html document and it seems to work for me. I don't have IE6 though...
Have a look at this -
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body {
	font: 100.1% "Comic Sans MS";
	background: #FFC109;
}
* {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
}
#container {
	width: 800px;
	margin: 30px auto;
	background: #999;
	overflow: auto;
	font-size: 0.8em;
}
#menu {
	height: 50px;
	/*margin: 0px auto;  -  no sense trying to center a full width element*/
	background: #264779;
}
#menu ul {
	padding: 0 0 0 10px;
	list-style: none;
}
#menu li {display: inline;}
#menu a {
	display: block;
	float: left;
	padding: 14px 30px 10px 8px;
	text-decoration: none;
	color: #FFFFFF;
}
#menu a:hover {
	color: #D7D7BD;
	background: #ffc109;
}
body#home a#homenav,
body#errorlogs a#errornav {
	color: #fff;
	background: #FFC109; /**Yellow*/
	padding: 14px 20px 10px 20px;
	text-decoration: none;
}
</style>
</head>
<body id="home">
    <div id="container">
    	<div id="menu">
        	<ul>
                <li><a href="#" id="homenav">button</a></li>
                <li><a href="#">button</a></li>
                <li><a href="#">button</a></li>
                <li><a href="#">button</a></li>
            </ul>
        <!--end menu--></div>
    <!--end container--></div>
</body>
</html>
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:29 PM.


Advertisement
Log in to turn off these ads.