PDA

View Full Version : how to remove the space below the css menu??


fattat
07-23-2009, 03:02 PM
how to remove the space below the menu??
in nav is already setting 36px, but below the menu still have a spacing on it??

http://img401.imageshack.us/img401/864/picture3jkl.png (http://img401.imageshack.us/i/picture3jkl.png/)


#nav {padding:0 0 0 30px; margin:0; list-style:none; font: 11px arial, sans-serif; position:relative; z-index:200; background:url(play.gif) no-repeat; height:36px; width:670px;}

the menu file is here
download file here :
http://www.zshare.net/download/630560846bf87418/

coloeagle
07-23-2009, 03:14 PM
Sorry fattat, not real big on doing downloads from sites that do popups. Could you provide a url or just post the code?

fattat
07-23-2009, 03:20 PM
Sorry fattat, not real big on doing downloads from sites that do popups. Could you provide a url or just post the code?

hi,
here is my html and css code

html 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" xml:lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> Stu Nicholls | CSSplay | Professional variable width menu #5</title>
<link rel="icon" href="../favicon.ico" type="image/ico" />

<link rel="stylesheet" href="menu.css" type="text/css" />

<!--[if lte IE 7]>
<link rel="stylesheet" media="all" type="text/css" href="pro_variable5/pro_variable5_ie6.css" />
<![endif]-->



</head>


<body>


<ul id="nav">
<li><a href="#nogo">HOME</a></li>
<li><a class="down" href="#nogo">ABOUT US</a>
<ul>
<li><a href="#nogo">Who we are Who we are</a></li>
<li><a href="#nogo">What we do</a></li>
<li class="last"><a href="#nogo">Where to find us</a></li>
</ul>
</li>
<li><a class="down" href="#nogo">PRODUCTS</a>
<ul>
<li><a class="fly" href="#nogo">Tripods</a>
<ul>
<li><a href="#nogo">Monopods</a></li>
<li><a href="#nogo">Tripods</a></li>
<li><a href="#nogo">Adjutable head Adjutable head</a></li>
<li><a href="#nogo">Fixed</a></li>
<li><a href="#nogo">Flash mount</a></li>
<li class="last"><a href="#nogo">Floating head</a></li>
</ul>
</li>
<li><a class="fly" href="#nogo">Films</a>
<ul>
<li><a href="#nogo">35mm</a></li>
<li><a href="#nogo">Color Print</a></li>
<li><a href="#nogo">Black and White</a></li>
<li><a href="#nogo">Roll</a></li>
<li class="last"><a href="#nogo">Color Slide</a></li>
</ul>
</li>
<li><a class="fly" href="#nogo">Cameras</a>
<ul>
<li><a class="fly" href="#nogo">Compact</a>
<ul>
<li><a href="#nogo">Canon</a></li>
<li><a href="#nogo">Nikon</a></li>
<li><a href="#nogo">Minolta</a></li>
<li class="last"><a href="#nogo">Pentax</a></li>
</ul>
</li>
<li><a class="fly" href="#nogo">Digital</a>
<ul>
<li><a href="#nogo">Canon</a></li>
<li><a class="fly" href="#nogo">Nikon</a>
<ul>
<li><a class="fly" href="#nogo">Lenses</a>
<ul>
<li><a href="#nogo">Standard</a></li>
<li><a href="#nogo">Telephoto</a></li>
<li><a href="#nogo">Wide Angle</a></li>
<li><a href="#nogo">Fish Eye</a></li>
<li><a href="#nogo">Mirror</a></li>
<li class="last"><a href="#nogo">Macro</a></li>
</ul>
</li>
<li><a href="#nogo">Speedlight</a></li>
<li><a class="fly" href="#nogo">Coolpix</a>
<ul>
<li><a href="#nogo">Coolpix S10</a></li>
<li><a href="#nogo">Coolpix L2</a></li>
<li><a href="#nogo">Coolpix S500</a></li>
<li><a href="#nogo">Coolpix P5000</a></li>
<li><a href="#nogo">Coolpix 4600</a></li>
<li class="last"><a href="#nogo">Coolpix S6 Silver</a></li>
</ul>
</li>
<li><a href="#nogo">D200</a></li>
<li class="last"><a href="#nogo">D80</a></li>
</ul>
</li>
<li><a href="#nogo">Minolta</a></li>
<li class="last"><a href="#nogo">Pentax</a></li>
</ul>
</li>
<li class="last"><a class="fly" href="#nogo">SLR</a>
<ul>
<li><a href="#nogo">Canon</a></li>
<li><a href="#nogo">Nikon</a></li>
<li><a href="#nogo">Minolta</a></li>
<li><a href="#nogo">Pentax</a></li>
<li class="last"><a href="#nogo">Panasonic</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#nogo">Flash</a></li>
<li class="last"><a href="#nogo">Video</a></li>
</ul>
</li>
<li><a class="down" href="#nogo">FAQs</a>
<ul>
<li><a href="#nogo">Cameras</a></li>
<li><a href="#nogo">Film types</a></li>
<li class="last"><a href="#nogo">Digital Photography</a></li>
</ul>
</li>
<li><a class="down" href="#nogo">PRIVACY</a>
<ul>
<li><a href="#nogo">Privacy Policy</a></li>
<li class="last"><a href="#nogo">Privacy Statement</a></li>
</ul>
</li>
<li><a class="topLink" href="#nogo">CONTACT US</a></li>
</ul>




</div>
</body>
</html>



css code

#nav {padding:0 0 0 30px; margin:0; list-style:none; font: 11px arial, sans-serif; position:relative; z-index:200; background:url(play.gif) no-repeat; height:36px; width:670px;}

#nav ul {padding:0; margin:0; list-style:none; float:left; background:#e5ba00; border-top:1px solid #fe7; border-color:#fe7 #b80 #b80 #fe7;}

#nav li {float:left;}
#nav li li {float:none; border-left:1px solid #fe7; border-right:1px solid #b80;}
#nav li li.last {border-bottom:1px solid #b80;}
/* a hack for IE6 */
* html #nav li li {float:left;}

#nav li a {display:block; float:left; color:#fff; height:36px; padding:0 25px 0 5px; line-height:36px; text-decoration:none; white-space:nowrap; font-weight:bold;}
#nav li a.down {background:url(down.gif) no-repeat right center;}

#nav li li a {display:block; height:20px; line-height:20px; float:none; padding:0 25px 0 5px; font-weight:normal; letter-spacing:1px;}
#nav li li a.fly {background:url(fly.gif) no-repeat right center;}

#nav li:hover {position:relative; z-index:300;}
#nav li.cssplay_hover {position:relative; z-index:300;}
#nav li.cssplay_hover a {color:#000;}

#nav li li a {color:#000;}
#nav li li.cssplay_hover a {color:#fff; background-color:#d5aa00;}

#nav li:hover ul {left:0; top:33px; z-index:500;}
#nav li.cssplay_hover ul {left:0; top:33px; z-index:500;}

#nav ul {position:absolute; left:-9999px; top:-9999px;}
* html #nav ul {width:2px;}
/* it could have been this simple if all browsers understood */
/* show next level */
#nav li:hover li:hover > ul {left:-5px; margin-left:100%; top:-1px; z-index:500;}
/* keep further levels hidden */
#nav li:hover > ul ul {position:absolute; left:-9999px; top:-9999px; width:auto; }
/* show path followed */
#nav li:hover > a {color:#000;}
#nav li li:hover > a {color:#fff; background-color:#d5aa00;}


/* but IE5.x and IE6 need this lot to style the flyouts*/
#nav li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover a
{color:#fff; background-color:#d5aa00;}

#nav li.cssplay_hover li.cssplay_hover li a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li a
{color:#000; background-color:#e5ba00;}

/* show next level */
#nav li.cssplay_hover li.cssplay_hover ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover ul
{left:100%; margin-left:-5px; top:-1px;}

/* keep further levels hidden */
#nav li.cssplay_hover ul ul,
#nav li.cssplay_hover li.cssplay_hover ul ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover ul ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover ul ul
{position:absolute; left:-9999px; top:-9999px;}

coloeagle
07-23-2009, 03:45 PM
Being somewhat familiar with a lot of Stu's work, I see one thing for starters. You do not have the list inside a div class. This may be required.

fattat
07-23-2009, 04:07 PM
Being somewhat familiar with a lot of Stu's work, I see one thing for starters. You do not have the list inside a div class. This may be required.

not very understand..have any solving way??

fattat
07-23-2009, 06:54 PM
anyone help??

Corrosive
07-23-2009, 07:05 PM
Colo has said, try putting the list inside a div class.

fattat
07-27-2009, 04:00 AM
Colo has said, try putting the list inside a div class.


i try adding div but still it become worst
the text is disappear

can help me find the problem?? thank


html 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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> Stu Nicholls | CSSplay | Professional variable width menu #5</title>

<link rel="stylesheet" href="menu.css" type="text/css" />
<!--[if lte IE 7]>
<link rel="stylesheet" media="all" type="text/css" href="ie2.css" />
<![endif]-->

</head>

<body>
<div id="nav">
<ul>
<li><a href="#nogo">HOME</a></li>
<li><a class="down" href="#nogo">ABOUT US</a>
<ul>
<li><a href="#nogo">Who we are Who we are</a></li>
<li><a href="#nogo">What we do</a></li>
<li class="last"><a href="#nogo">Where to find us</a></li>
</ul>
</li>
<li><a class="down" href="#nogo">PRODUCTS</a>
<ul>
<li><a class="fly" href="#nogo">Tripods</a>
<ul>
<li><a href="#nogo">Monopods</a></li>
<li><a href="#nogo">Tripods</a></li>
<li><a href="#nogo">Adjutable head Adjutable head</a></li>
<li><a href="#nogo">Fixed</a></li>
<li><a href="#nogo">Flash mount</a></li>
<li class="last"><a href="#nogo">Floating head</a></li>
</ul>
</li>
<li><a class="fly" href="#nogo">Films</a>
<ul>
<li><a href="#nogo">35mm</a></li>
<li><a href="#nogo">Color Print</a></li>
<li><a href="#nogo">Black and White</a></li>
<li><a href="#nogo">Roll</a></li>
<li class="last"><a href="#nogo">Color Slide</a></li>
</ul>
</li>
<li><a class="fly" href="#nogo">Cameras</a>
<ul>
<li><a class="fly" href="#nogo">Compact</a>
<ul>
<li><a href="#nogo">Canon</a></li>
<li><a href="#nogo">Nikon</a></li>
<li><a href="#nogo">Minolta</a></li>
<li class="last"><a href="#nogo">Pentax</a></li>
</ul>
</li>
<li><a class="fly" href="#nogo">Digital</a>
<ul>
<li><a href="#nogo">Canon</a></li>
<li><a class="fly" href="#nogo">Nikon</a>
<ul>
<li><a class="fly" href="#nogo">Lenses</a>
<ul>
<li><a href="#nogo">Standard</a></li>
<li><a href="#nogo">Telephoto</a></li>
<li><a href="#nogo">Wide Angle</a></li>
<li><a href="#nogo">Fish Eye</a></li>
<li><a href="#nogo">Mirror</a></li>
<li class="last"><a href="#nogo">Macro</a></li>
</ul>
</li>
<li><a href="#nogo">Speedlight</a></li>
<li><a class="fly" href="#nogo">Coolpix</a>
<ul>
<li><a href="#nogo">Coolpix S10</a></li>
<li><a href="#nogo">Coolpix L2</a></li>
<li><a href="#nogo">Coolpix S500</a></li>
<li><a href="#nogo">Coolpix P5000</a></li>
<li><a href="#nogo">Coolpix 4600</a></li>
<li class="last"><a href="#nogo">Coolpix S6 Silver</a></li>
</ul>
</li>
<li><a href="#nogo">D200</a></li>
<li class="last"><a href="#nogo">D80</a></li>
</ul>
</li>
<li><a href="#nogo">Minolta</a></li>
<li class="last"><a href="#nogo">Pentax</a></li>
</ul>
</li>
<li class="last"><a class="fly" href="#nogo">SLR</a>
<ul>
<li><a href="#nogo">Canon</a></li>
<li><a href="#nogo">Nikon</a></li>
<li><a href="#nogo">Minolta</a></li>
<li><a href="#nogo">Pentax</a></li>
<li class="last"><a href="#nogo">Panasonic</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#nogo">Flash</a></li>
<li class="last"><a href="#nogo">Video</a></li>
</ul>
</li>
<li><a class="down" href="#nogo">FAQs</a>
<ul>
<li><a href="#nogo">Cameras</a></li>
<li><a href="#nogo">Film types</a></li>
<li class="last"><a href="#nogo">Digital Photography</a></li>
</ul>
</li>
<li><a class="down" href="#nogo">PRIVACY</a>
<ul>
<li><a href="#nogo">Privacy Policy</a></li>
<li class="last"><a href="#nogo">Privacy Statement</a></li>
</ul>
</li>
<li><a class="topLink" href="#nogo">CONTACT US</a></li>
</ul>
</div>

</body>
</html>



css code

@charset "UTF-8";
/* CSS Document */
/* ================================================== ==============
This copyright notice must be kept untouched in the stylesheet at
all times.
The original version of this stylesheet and the associated (x)html
is available at http://www.cssplay.co.uk/menus/pro_variable4.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This stylesheet and the associated (x)html may be modified in any
way to fit your requirements.
================================================== ================= */
#nav {padding:0 0 0 30px; margin:0; list-style:none; font: 11px arial, sans-serif; position:relative; z-index:200; background:url(play.gif) no-repeat; height:36px; width:670px;}

#nav ul {padding:0; margin:0; list-style:none; float:left; background:#e5ba00; border-top:1px solid #fe7; border-color:#fe7 #b80 #b80 #fe7;}
#nav li {float:left;}
#nav li li {float:none; border-left:1px solid #fe7; border-right:1px solid #b80;}
#nav li li.last {border-bottom:1px solid #b80;}
/* a hack for IE6 */
* html #nav li li {float:left;}
#nav li a {display:block; float:left; color:#fff; height:36px; padding:0 25px 0 5px; line-height:36px; text-decoration:none; white-space:nowrap; font-weight:bold;}
#nav li a.down {background:url(down.gif) no-repeat right center;}
#nav li li a {display:block; height:20px; line-height:20px; float:none; padding:0 25px 0 5px; font-weight:normal; letter-spacing:1px;}
#nav li li a.fly {background:url(fly.gif) no-repeat right center;}
#nav li:hover {position:relative; z-index:300;}
#nav li.cssplay_hover {position:relative; z-index:300;}
#nav li.cssplay_hover a {color:#000;}
#nav li li a {color:#000;}
#nav li li.cssplay_hover a {color:#fff; background-color:#d5aa00;}
#nav li:hover ul {left:0; top:33px; z-index:500;}
#nav li.cssplay_hover ul {left:0; top:33px; z-index:500;}
#nav ul {position:absolute; left:-9999px; top:-9999px;}
* html #nav ul {width:2px;}
/* it could have been this simple if all browsers understood */
/* show next level */
#nav li:hover li:hover > ul {left:-5px; margin-left:100%; top:-1px; z-index:500;}
/* keep further levels hidden */
#nav li:hover > ul ul {position:absolute; left:-9999px; top:-9999px; width:auto; }
/* show path followed */
#nav li:hover > a {color:#000;}
#nav li li:hover > a {color:#fff; background-color:#d5aa00;}

/* but IE5.x and IE6 need this lot to style the flyouts*/
#nav li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover a
{color:#fff; background-color:#d5aa00;}
#nav li.cssplay_hover li.cssplay_hover li a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li a,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li a
{color:#000; background-color:#e5ba00;}
/* show next level */
#nav li.cssplay_hover li.cssplay_hover ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover ul
{left:100%; margin-left:-5px; top:-1px;}
/* keep further levels hidden */
#nav li.cssplay_hover ul ul,
#nav li.cssplay_hover li.cssplay_hover ul ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover ul ul,
#nav li.cssplay_hover li.cssplay_hover li.cssplay_hover li.cssplay_hover ul ul
{position:absolute; left:-9999px; top:-9999px;}



ie hack css code

@charset "utf-8";
/* CSS Document */
#nav li li a {behavior: expression(this.style.width=this.parentNode.parent Node.offsetWidth -32 + 'px', this.style.behavior=null);} /* minus link padding 30px + 2px for ul border width */
* html #nav li {behavior: expression(this.onmouseover=new Function("this.className+=' cssplay_hover'"),this.onmouseout=new Function("this.className = this.className.replace('cssplay_hover','')"),this.style.behavior=null);}