/    Sign up×
Community /Pin to ProfileBookmark

Please Help with Rollover

I use a rollover effect to have the entire cell/text in my navigation table change when you mouse over it on my website

[url]http://www.yourwebdesignservice.com/[/url]

However, for whatever reason, in IE the only cell that gets the desired effect is the top cell containg a link back to the homepage. On the rest of the cells, you have to scroll over the actual anchor text in order to achieve the rollover. I want the effect to occur if any part of the cell is mouse-overed, which is the case in the top cell.

This occurs in IE, however in Netscape the effect works fine.

Here is the code for the table:

[CODE]<tr>
<td align=”left” width=”160″ valign=”top”>
<table class=”nav-table” cellspacing=”2″>
<tr>
<td><a href=”index.html” class=”nav-cells”>Home</a></td>
</tr>
<tr>
<td><a href=”pages/web-design-services.html” class=”nav-cells”>Web Services</a></td>
</tr>
<tr>
<td><a href=”pages/contact.html” class=”nav-cells”>Contact</a></td>
</tr>
<tr>
<td><a href=”pages/testimonials.html” class=”nav-cells”>Testimonials</a></td>
</tr>
<tr>
<td><a href=”pages/portfolio.html” class=”nav-cells”>Portfolio</a></td>
</tr>
<tr>
<td><a href=”pages/graphics.html” class=”nav-cells”>Graphics</a></td>
</tr>
<tr>
<td><a href=”pages/bio.html” class=”nav-cells”>Bio</a></td>
</tr>
</table>
</td>[/CODE]

Here is the code in my stylesheet:

[CODE].nav-table {
background-color: #FFFFFF;
width: 100%;
}
a.nav-cells:link, a.nav-cells:visited, a.nav-cells:active {
display: block;
border: 1px solid #000000;
padding: 5px;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bolder;
text-transform: capitalize;
background-color: #FF8C00;
color: #FFFFFF;
}
a.nav-cells:hover {
background-color: #F4C587;
color: #000000;
}[/CODE]

Can anyone tell me why this is happening in IE, and how I can fix it to achieve the desired effect?

Thanks!

to post a comment
CSS

7 Comments(s)

Copy linkTweet thisAlerts:
@BonRougeNov 18.2005 — Try this: * html a.nav-cells {
height:1px;
}
Copy linkTweet thisAlerts:
@jpmattisauthorNov 18.2005 — thanks. That worked for IE, I will have to check the other browsers.

Just out of curiousity, why do you need to set the height to 1px in order to get that effect with IE?

Thanks!
Copy linkTweet thisAlerts:
@BonRougeNov 18.2005 — It's because [url=http://bonrouge.com/br.php?page=faq#haslayout]IE's crap[/url].
Copy linkTweet thisAlerts:
@jpmattisauthorNov 18.2005 — Haha.

One more thing, why does the navigation table look completely screwed up in Firefox? Any ideas how to fix that?

Thanks!
Copy linkTweet thisAlerts:
@jpmattisauthorNov 18.2005 — Actually, now it looks like crap in Firefox and Netscape, from the 1px height attribute. Is there any other way around this that anybody knows about?
Copy linkTweet thisAlerts:
@jpmattisauthorNov 18.2005 — I just set the width attribute for the 'nav-cells' class. That seemed to do the trick in all the browsers. If anyone knows of a better way, I am all ears (or eyes in this case).

Thanks.
Copy linkTweet thisAlerts:
@BonRougeNov 19.2005 — If you used the code that I posted above, there would be no effect on Firefox or Netscape. They ignore that code - it's for IE only.
×

Success!

Help @jpmattis spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...