3 replies [Last post]
AaronIvan
AaronIvan's picture
User offline. Last seen 1 year 39 weeks ago. Offline
newbie
Timezone: GMT+8
Joined: 2010-08-03
Posts: 9
Points: 14

Hey guys, I only started using css today. I'm re-coding my html website into css.
So far so good, but i've ran into a problem.

I found a guide how to create a mouseover navigational menu. I've got it working but it uses "span" as a clickable link. However i can't format each span seperately so when hovering over the image the background image isn't inline for each thing...

It's hard to explain so i'll just show you
If you navigate to the page below and hover over the nav buttons, you can see that they're not inline. I know why - because there is only one defining property for all of them, but theyre different lengths. But i don't know how to fix it.

And here is the html and css.

.cssnav {
position:relative;
font-family: "arial",sans-serif;
background-image: url(images/navover.png);
background-repeat: no-repeat;
display: block;
left: 224px;
float: left;
width: 70px;
height: 55px;
margin: 0;
margin-bottom:0px;
padding: 0;
}

.cssnav a {
display:block;
font-size: 0.85em;
width: 70px;
height: 55px;
float: left;
margin: 0;
padding: 0;
color: #c9c9c9; text-decoration: none;
}
.cssnav img {width: 100%; height: 100%; border: 0; }
* html a:hover {visibility:visible}
.cssnav a:hover img{visibility:hidden}
.cssnav span {
position:absolute;
left:12px;
top:24px;
margin:0;
cursor: pointer;
}

Hope you can help.
Regards

AaronIvan
AaronIvan's picture
User offline. Last seen 1 year 39 weeks ago. Offline
newbie
Timezone: GMT+8
Joined: 2010-08-03
Posts: 9
Points: 14

no one

no one help?

thepineapplehead
thepineapplehead's picture
User offline. Last seen 2 weeks 5 days ago. Offline
rank Guru
Guru
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9667
Points: 799

Use CODE tags please

Use CODE tags please Laughing out loud

Verschwindende wrote:
  • CSS doesn't make pies

Tyssen
Tyssen's picture
User offline. Last seen 1 day 21 hours ago. Offline
rank Moderator
Moderator
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8140
Points: 1322

He won't be able to: he's

He won't be able to: he's been banned for adding spammy links to his posts.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference