Current location: Hot Scripts Forums » General Web Coding » CSS » CSS Drop Down Menu Query


CSS Drop Down Menu Query

Reply
  #1 (permalink)  
Old 07-11-09, 03:37 PM
Zefer's Avatar
Zefer Zefer is offline
Wannabe Coder
 
Join Date: May 2007
Posts: 190
Thanks: 2
Thanked 0 Times in 0 Posts
CSS Drop Down Menu Query

HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<title>Untitled Document</title>
		<style type="text/css">
			.submenu {
				display:none;
			}
			.list:hover .submenu {
				list-style:none;
				display:block;
			}
			.list:hover {
				background:#00FF00;
			}
			.list {
				background:#FF00FF;
				text-align:center;
				list-style:none;
				width:10%;
			}
			.submenu {
				text-align:center;
			}
			.item {
				
			}
			.item:hover {
				background:#FF0000;
			}
		</style>
	</head>
	<body>
		<ul class="menu">
			<li class="list">
				Hello!
				<ul class="submenu">
					<li class="item">1</li>
					<li class="item">2</li>
					<li class="item">3</li>
				</ul>
			</li>
		</ul>
	</body>
</html>
How can I make it so the li's classed "item" will be the full width of the box they're in?
__________________
I know how to code in: JavaScript, PHP, (x)HTML, CSS, QuickBasic, VisualBasic
I'm learning to code in: C++ and Python

If my post was helpful, press the thanks button below.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-11-09, 11:12 PM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
#menu li ul {
    display: none;
    position: absolute;
    z-index: 10;
}
#menu ul {list-style-type:none;padding:0; margin:0;width:260px;}
#menu ul li {float:left; position:relative; z-index:auto !important ; z-index:1000 ; border-right:solid 1px #000000; border-left:solid 1px #000000;}
#menu ul li a {color: #FFFFFF;background: #000000;float:none !important ; float:left ; display:block; height:30px; line-height:30px; padding:0 10px 0 10px; text-decoration:none; width:260px;}
#menu ul li:hover a {background-color:#0000ff; text-decoration:none; color:#FFFF00;}
#menu ul li:hover ul {display:block;  Width:260px; position:absolute; z-index:999; top:29px; margin-top:1px; left:0;}
#menu ul li:hover ul li a {display:block; width:260px; height:auto; line-height:1.3em; margin-left:-1px; padding:5px 10px 5px 10px; border-left:solid 1px #000000; border-bottom: solid 1px #000000; background-color:#000000;  color:#FFFFFF;}
#menu ul li:hover ul li a:hover {background-color:#ff0000; text-decoration:none;color:#FFFF00;}
#menu ul li a:hover {background-color:#0000ff; text-decoration:none;color:#FFFF00;}
</style>
</head>
<body>
<div id="menu">
 <ul id="menuList">
  <li><a href="#">Hello!</a>
    <ul>
     <li><a href="#">1</a></li>
     <li><a href="#">2</a></li>
     <li><a href="#">3</a></li>
    </ul>
  </li>
 </ul>
</div>
</body>
</html>
__________________
Jerry Broughton
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-12-09, 10:19 AM
Zefer's Avatar
Zefer Zefer is offline
Wannabe Coder
 
Join Date: May 2007
Posts: 190
Thanks: 2
Thanked 0 Times in 0 Posts
Thank-you very much.
__________________
I know how to code in: JavaScript, PHP, (x)HTML, CSS, QuickBasic, VisualBasic
I'm learning to code in: C++ and Python

If my post was helpful, press the thanks button below.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Superfish jquery menu problems with modification transcend2005 CSS 2 03-25-09 02:30 AM
css problem with the scroll bar crazy.works CSS 0 11-04-08 06:34 PM
Xml / Dom / Css Mark_SC.SE JavaScript 0 06-29-05 09:05 AM
Declared Functions skipper23 PHP 4 12-17-03 11:06 AM
index page not showing up skipper23 PHP 3 12-15-03 02:10 PM


All times are GMT -5. The time now is 12:57 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.