View Single Post
Old 12-18-2012, 03:04 PM   PM User | #2
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 GedC,
Your ul that flys out covers that right 40px or so on the parent.

When you use absolute positioning on your flyout ul, you need to use positioning instead of margin.

Look at these changes to your CSS -
Code:
#nav li {
	list-style : none;
	/*width : 150px;
	display : block;  --li is already block level*/
  position: relative;
}
 
#nav li a{
	display : block;
	text-decoration : none;
	background : #036;
	padding-left : 8px;
	line-height : 29px;
	color : #fff;
	border-bottom : solid 1px #fff;
	width : 150px;
}

#nav li ul {
  padding: 0;
	display : none;
}

#nav li:hover ul{
	display : block;
	position : absolute;
  top: 0;
 left: 158px;
	/*margin-top : -30px;
	margin-left : 110px;*/
}
__________________
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

Last edited by Excavator; 12-18-2012 at 03:06 PM..
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
GedC (12-19-2012)