#navcontainer ul
{
padding-left: 0;
margin-left: 0;
background-color: #039;
color: White;
float: left;
width: 100%;
font-family: arial, helvetica, sans-serif;
}
#navcontainer ul li { display: inline; }
#navcontainer ul li a
{
padding: 0.2em 1em;
background-color: #039;
color: White;
text-decoration: none;
float: left;
border-right: 1px solid #fff;
}
#navcontainer ul li a:hover
{
background-color: #369;
color: #fff;
}
The above comes from the listmatic site, so I dont want to take credit for it.
Ordinarily, I'd have just used a set of Image Controls, but I'm not allowed.
So far to try and get this working, I've created a new style that points to an image (dont care at this stage what te image is)
Code:
#navcontainer ul li a.home
{
background-image: url( '../Images/button_search_off.gif' );
background-repeat: no-repeat;
float: left;
}
and in the html I've placed a new li item referencing the above
In the designer of vs2008 in design mode, the graphic displays as expected. However, when I run the page, the graphic almost disappears off the top of the navbar
Last edited by Bill Crawley; August 18th, 2009 at 08:06 AM.
If you find my answers helpful, dont forget to rate me
You can make it horizontal by encasing it in a <div> tag with the same width.
P.S. Internet Explorer and Firefox/Safari render lists differently. Most of it is because of changes in how they handle margin and padding. Since you have not supplied all parameters for margin and padding, this might be the problem.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
solved it, though i think I need a ceffeine fix now.
Here's the solution for anyone else that might hit this prob.
Assuming you have the code I originally pasted:
Code:
#navcontainer ul li a.home
{
background-image: url( '../Images/button_search_off.gif' );
background-repeat: no-repeat;
float:left;
padding:1em 1em; /* needed for firefox, remove for i.e. */
}
It's the padding that needs to be concentrated on.
If you find my answers helpful, dont forget to rate me
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.