Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

CSS ul / Link Problem

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch
Impact
200
I'm relatively new to CSS... :'(

I'm trying to create a sidebar menu using <ul id="menu"> instead of <div id="menu"> and even if the images do show up on both FF & IE, the <a href="link"> for each button won't work (like if I move my cursor over the buttons, nothing happens). Can someone help me identify the problem? Thanks.

The HTML part looks a bit like this (I'm just replacing the id names):

Code:
<ul id="menu">
<li id="home"><a href="home.html"></a></li>
<li id="about"><a href="about.html"></a></li>
<li id="contact"><a href="contact.html"></a></li>
</ul>

The CSS part looks a bit like this:

Code:
#home, #home a {
		margin: 0 auto;
		padding: 0px;
		border: none;
		text-indent: -10000px;
		background-image: url(images/home.png);
		background-repeat: no-repeat;
		height: 50px;
		width: 300px;
}

#home a:hover {
		background-image: url(images/home_on.png);
}
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
There's nothing within your <a> tags. Perhaps you could try putting some whitespace.
 
1
•••
Add "display: block;" to your CSS for #home a.

Maybe...
 
1
•••
as kate said, you'll need something between your <a> tags. you should probably put an image there (home.png maybe?). if you go through the thought process, what you want to link is the image home.png itself, unless you plan to put text on top of the image. otherwise, the image isn't really a background; it's the foreground!
 
1
•••
Epic said:
Add "display: block;" to your CSS for #home a.

Maybe...

It worked. :D Thanks so much!!! :sold:
 
0
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back