whats wrong with this css code?

greg's picture

He has: 1,581 posts

Joined: Nov 2005

I copied and pasted the code from a website
i have checked and double checked and can't find whats wrong

its a horizontal navigation button menu bar, using two images to draw the menu itself, one balck image for the menu and red one for hover
when i hover the red shows up, and the links work, but i cant get the black image to show the menu as standard
tried in IE and FF
there is just nothing there on the page until I hover, then the red appears

the two images are in the same folder and the CSS points to the same (and correct) location

CSS CODE

<style type="text/css">

/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */

.solidblockmenu{
margin: 0;
padding: 0;
float: left;
font: bold 13px Arial;
width: 100%;
border: 1px solid #625e00;
border-width: 1px 0;
background: black url(/images/blockdefault.gif) center center repeat-x;
}

.solidblockmenu li{
display: inline;
}

.solidblockmenu li a{
float: left;
color: white;
padding: 9px 11px;
text-decoration: none;
border-right: 1px solid white;
}

.solidblockmenu li a:visited{
color: white;
}

.solidblockmenu li a:hover, .solidblockmenu li .current{
color: white;
background: transparent url(/images/blockactive.gif) center center repeat-x;
}

</style>

<!--[if IE]>
<style type="text/css">
p.iepara{ /*Conditional CSS- For IE (inc IE7), create 1em spacing between menu and paragraph that follows*/
padding-top: 1em;
}
</style>
<![endif]-->
'

HTML CODE (this code is in a .php file BTW)

<ul class="solidblockmenu">
<li><a href="index.php">Home Page</a></li>
<li><a href="packages.php">Packages</a></li>
<li><a href="services.php">Services</a></li>
<li><a href="profile.php">Company Profile</a></li>
</ul>
<br style="clear: left" />
'

many thanks if you can help

greg's picture

He has: 1,581 posts

Joined: Nov 2005

ok i figured it out...

by

/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */

.solidblockmenu{
margin: 0;
padding: 0;
float: left;
font: bold 13px Arial;
width: 100%;
border: 1px solid #625e00;
border-width: 1px 0;
background: black url(/images/blockdefault.gif) center center repeat-x; <---MOVING THIS
}

.solidblockmenu li{
display: inline;
}

.solidblockmenu li a{
float: left;
color: white;
padding: 9px 11px;
text-decoration: none;
border-right: 1px solid white;
background: black url(/images/blockdefault.gif) center center repeat-x; <-- TO HERE

They have: 1 posts

Joined: Apr 2007

Can you tell me why this will not work on its real location, that is , the location it was present ealier.

Regards,
http://www.joomlaresource.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.