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 07-30-2012, 08:33 AM   PM User | #1
GauravJoshi88
New to the CF scene

 
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
GauravJoshi88 is an unknown quantity at this point
Urgent Help .....!! Nav Menu Css formatting

Guys im super noob in CSS .... here's my CSS code for Nav menu The text in sub menu flows out of field i want them to autto arrange it self ....ie. if the field is too long it should auto arrange itself in 2 or 3 lines



Code:
#menu2 {padding:0; width:750px; margin:0; list-style:none; height:28px; position:relative; z-index:500; font-family:arial, verdana, sans-serif; background:#000; border-bottom:1px solid #edb; text-align:left;}
#menu2 li.top {display:block; float:left;}

#menu2 li a.top_link {display:block; height:25px; float:left; line-height:22px; font-size:11px; font-weight:bold; padding:0 20px 0 10px; color:#edb; text-decoration:none; border-top:3px solid #000;text-align:left;}

#menu2 li a.top_link:hover {color:#d85; border-color:#a52;}

#menu2 li:hover > a.top_link {color:#d85; border-color:#a52;}

#menu2 table {border-collapse:collapse; width:0; height:0; position:absolute; top:0; left:0;}

/* Default link styling */

/* Style the list OR link hover. Depends on which browser is used */

#menu2 a:hover {visibility:visible; position:relative; z-index:200;}
#menu2 li:hover {position:relative; z-index:200;}

/* keep the 'next' level invisible by placing it off screen. */
#menu2 ul, 
#menu2 :hover ul ul, 
#menu2 :hover ul :hover ul ul,
#menu2 :hover ul :hover ul :hover ul ul,
#menu2 :hover ul :hover ul :hover ul :hover ul ul {position:absolute; left:-9999px; top:-9999px; height:0; margin:0; padding:0; list-style:none;}

#menu2 :hover ul.sub {left:0; top:25px; white-space:nowrap; width:220px; height:auto; z-index:300; padding-top:5px; background:url(../images/trans.gif);}
#menu2 :hover ul.sub li {display:block; float:left; width:100%; height:25px;}
#menu2 :hover ul.sub li span {display:block; height:25px; float:left; width:90px; font-weight:normal;}
#menu2 :hover ul.sub li b {display:block; height:25px; float:left; width:30px; font-weight:bold;}

#menu2 :hover ul.sub li a {display:block; position:relative; font-size:11px; height:25px; width:120px; margin-right:-30px; line-height:25px; text-indent:10px; color:#edb; text-decoration:none; background:url(../images/trans.gif);}

#menu2 :hover ul.sub li span a:hover {color:#f97;}

#menu2 :hover ul.sub li:hover > span a {color:#f97;}

#menu2 :hover ul :hover ul,
#menu2 :hover ul :hover ul :hover ul,
#menu2 :hover ul :hover ul :hover ul :hover ul,
#menu2 :hover ul :hover ul :hover ul :hover ul :hover ul
{left:120px; top:0; white-space:auto; width:150px; z-index:400; height:auto; }

#menu2 :hover ul.wide {width:150px;}
#menu2 :hover ul.wide li span {width:120px;}
#menu2 :hover ul.wide li a {width:150px;}

#menu2 :hover ul.narrow {width:190px;}
#menu2 :hover ul.narrow li span {width:160px;}
#menu2 :hover ul.narrow li a {width:190px;}

#menu2 :hover ul.narrow :hover ul,
#menu2 :hover ul :hover ul.narrow :hover ul,
#menu2 :hover ul :hover ul :hover ul.narrow :hover ul,
#menu2 :hover ul :hover ul :hover ul :hover ul.narrow :hover ul
{left:90px;}

#menu2 {
	 width: auto !important; 
}

#menu2 li > span {
background: url(../images/tab-midleft.png);
}
#menu2 li > b {
background: url(../images/tab-midright.png)
}
#menu2 li.fly > b {
background: url(../images/tab-midright-sub.png)
}

#menu2 li.subtop > span,
#menu2 li.flytop > span { 
background:url(../images/tab-topleft.png);
}
#menu2 li.subtop > b {
background:url(../images/tab-topright.png);
}

#menu2 li.flytop > b {
background:url(../images/tab-topright-sub.png);
}

#menu2 li.subbot > span,
#menu2 li.flybot > span {
height:35px !important; background:url(../images/tab-botleft.png);
}

#menu2 li.subbot > b {
height:35px !important; background:url(../images/tab-botright.png);
}
#menu2 li.flybot > b {
height:35px !important; background:url(../images/tab-botright-sub.png);
}
GauravJoshi88 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 10:13 AM.


Advertisement
Log in to turn off these ads.