Page 1 of 1

[ SOLVED ]<ul><li> Horizontal menu

Posted: Thu Jan 25, 2007 4:04 pm
by wtf
Does anyone know how to fix this or get it to look fine?

http://cakemonster.net/lihorizontalmenu.html

I need to get the <li> element to the right to line up with the rest of the gang.

Code: Select all

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

<style type="text/css">

input, ul, li {
	padding: 0;
	margin: 0;
}

#navlist {
	border: 1px solid #000;

	margin: 0;
	background-color: #ACF;
	font-family: verdana,sans-serif;
	font-size: 12px;
	font-weight: bold;
	padding: 6px;
}

#navlist li {
	display: inline;
	list-style: none;
	padding: 0;
	margin: 0;
}

#navlist #active {
	float: right;
	margin-right: 5px;
	background-color: #FF99FF;
}

#navlist li a {
	text-decoration: none;
	padding: 4px 12px 4px 12px;
	margin: 10px 5px;
	background-color: #FFFccc;
	color: #000;
}

</style>

</head>

<body>

<div>
	<ul id="navlist">
		<li id="active"><input type="text" name="keyword"  /> <input type="submit" name="search" value=" GO "/></li>
		<li><a href="#">Item three</a></li>
		<li><a href="#">Item three</a></li>
		<li><a href="#">Item four</a></li>
		<li><a href="#">Item five</a></li>
	</ul>
<div>

</body>
</html>

Posted: Thu Jan 25, 2007 4:11 pm
by Luke
I wouldn't put the text box in the list... I'd float it to the right in a div

Posted: Thu Jan 25, 2007 4:13 pm
by Christopher
Or specify padding in for "active" that positions it correctly.

Posted: Tue Jan 30, 2007 6:12 pm
by wtf
Thank you gents. I appreciate it very much.