[ SOLVED ]<ul><li> Horizontal menu

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
wtf
Forum Contributor
Posts: 331
Joined: Thu Nov 03, 2005 5:27 pm

[ SOLVED ]<ul><li> Horizontal menu

Post 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>
Last edited by wtf on Tue Jan 30, 2007 6:13 pm, edited 1 time in total.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I wouldn't put the text box in the list... I'd float it to the right in a div
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Or specify padding in for "active" that positions it correctly.
(#10850)
User avatar
wtf
Forum Contributor
Posts: 331
Joined: Thu Nov 03, 2005 5:27 pm

Post by wtf »

Thank you gents. I appreciate it very much.
Post Reply