Forum Moderators: not2easy
the page is located at [oooops]
Here's the code:
<style>
#mainnav
{
margin: 0;
padding: 0;
float: left;
list-style: none;
background:ffffff;
font-family:Arial, Helvetica, sans-serif;
font-size: 110%;
font-weight: bold;
}
.nav_home
{
margin: 0;
float:left;
padding: 3px 8px;
display: block;
color:#FFFFFF;
background-color: #000000;
}
.nav_home_select
{
margin: 0;
float:left;
padding: 3px 10px;
display: block;
color:#FFFFFF;
border-right: #FFFFFF thin solid;
}
.nav_coop
{
margin: 0;
float:left;
padding: 3px 10px;
display: block;
color: #CC6600;
border-right: #000 thin solid;
}
.nav_c
{
margin: 0;
float:left;
padding: 3px 10px;
display: block;
color: #5D855D;
border-right: #000 thin solid;
}
.nav_other
{
margin: 0;
float:left;
padding: 3px 10px;
display: block;
color:#508CD4;
border-right: #000 thin solid;
}
#search
{
padding: 1px;
margin: 0;
float: right;
}
#nav_wrap
{
border-bottom: #000000 thin solid;
}
</style>
</head>
<body>
<div id="nav_wrap">
<ul id="mainnav">
<li class="nav_home">Home</li>
<li class="nav_coop">Code Co-op</li>
<li class="nav_c">C++ Resources</li>
<li class="nav_other">Freeware</li>
<li class="nav_other">Science</li>
<li class="nav_other">Scoop</li>
<li class="nav_search"></li>
</ul>
<div id="search">
<form name='Search' action='Query.asp' method='get'>
<input type='text' name='InputString' size='12' maxlength='50' value='Search'>
<input type='submit' name='Action' value='GO'></form>
</div>
</div>
[edited by: SuzyUK at 9:55 pm (utc) on Mar. 3, 2006]
[edit reason] ooops sorry no URLs : see TOS #13 [WebmasterWorld.com] [/edit]
thanks!
Both your "mainnav" and "search" divs are set to float left and right - but nothing is clearing them. Which means the bottom of your wrapper div has nothing to wrap.
Add this to your HTML:
<input type='submit' name='Action' value='GO'></form>
</div>
<hr />
</div>
and this to your CSS:
hr {
clear:both;
display:block;
visibility:hidden;}
That will clear your floats, and cause the main wrapper to understand there are things inside the div, and will expand it below the floated divs.