Here's the code:
css
body
{
background-color: Silver;
}
#contentMain
{
background-color: Transparent;
}
#divLogoNem, #divCompanyNews, #divLogin, #divNavigation, #divContentMain, #divLegalities
{
width: 790px;
margin: auto;
}
.bg
{
width: 800px;
margin-left: auto;
margin-right: auto;
}
#divBg
{
background-image: url(../images/back.gif);
background-position: center;
background-repeat: repeat-y;
padding: 1px 0 1px 0;
}
#mainMenu
{
padding: 0;
background-image:url(../images/menuBack.gif);
list-style-type: none;
background-repeat:repeat-x;
}
li
{
float: left;
}
Here's the page...
HTML
<%@ Master Language="VB" CodeFile="Site.master.vb" Inherits="Site" %>
<!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 runat="server">
<link rel="stylesheet" type="text/css" href="css/main.css" />
<title>Untitled</title>
</head>
<body>
<form id="masterForm" runat="server">
<div id="divTopBg" class="bg">
<img src="images/top.gif" id="topbg" alt=""/>
</div>
<div id="divBg">
<div id="divLogoNem" class="back">
</div>
<div id="divCompanyNews" class="back">
</div>
<div id="divLogin" class="back">
</div>
<div id ="divNavigation" class="back">
<ul id="mainMenu">
<li>Home</li>
<li>Products</li>
<li>Services</li>
<li>News & Events</li>
<li>Inquiry / Feedback</li>
<li>Technical Support</li>
<li>Company Information</li>
<li>Careers</li>
</ul>
<ul id="prodMenu" runat="server">
<li>MICS</li>
<li>Shift Manager</li>
<li>NETS</li>
</ul>
<ul id="servMenu" runat="server">
<li>Billing</li>
</ul>
<ul id="newsMenu" runat="server">
<li>Press Release</li>
<li>User Conferences & Forums</li>
<li>Trade Shows</li>
</ul>
<ul id="suppMenu" runat="server">
<li>Request Form</li>
<li>Bomgar</li>
</ul>
<ul id="compInfoMenu" runat="server">
<li>History</li>
<li>Employees</li>
<li>Testimonials</li>
<li>Contact Us</li>
</ul>
</div>
<div id="divContentMain" class="back">
<asp:contentplaceholder id="contentMain" runat="server">
</asp:contentplaceholder>
</div>
<div id="divLegalities" class="back">
</div>
</div>
<div id="divBottomBg" class="bg">
<img src="images/bottom.gif" id="bottombg" alt=""/>
</div>
</form>
</body>
</html>
And here's the code behind the page...
vb
Partial Class Site
Inherits System.Web.UI.MasterPage
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
prodMenu.Visible = False
servMenu.Visible = False
newsMenu.Visible = False
suppMenu.Visible = False
compInfoMenu.Visible = False
End Sub
End Class
Now, my problem. I have a background that is basically a 800x25 pixel strip. it's with the ends have a blue line down the side. I have it repeat y so it will make the expandable.
I'm putting the navigation system in. It's an unordered list so I need to float: left the list items so they'll be in a line. I have a gradient background light blue in the middle dark blue at the top and bottom. What I want is to have the line background behind it.
But whenever I put in the float the background disappears... When the float is taken out... it reappears? Any help please?