iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-26-2007, 01:33 AM
WebProWorld Pro
 
Join Date: Nov 2004
Location: Westmoreland County, PA
Posts: 218
noel_x99 RepRank 0
Default Some CSS Help for IE

I have a hover menu started - when you hover over the words, the text changes from black to gold and a new image is displayed next to the text. (On this temp version, I used the same pic for all images, but added a text layer to show the difference.)

In IE, it only works if I have a background color on the hover link. If I remove the background color then the hover images no longer work (although the color change on the text is fine).

Here is the menu
With Background color on hover: BACKGROUND COLOR

Without background color on hover: NO BACKGROUND COLOR

In FF, it's fine. In IE, the text color changes on hover, but the images do not change.

This is the only difference in the two pages:

#menu a.p1:hover, #menu a.p2:hover, #menu a.p3:hover, #menu a.p4:hover, #menu a.p5:hover, #menu a.p6:hover {background-color:#fff; text-decoration:none; color:#FED200; }

#menu a.p1:hover, #menu a.p2:hover, #menu a.p3:hover, #menu a.p4:hover, #menu a.p5:hover, #menu a.p6:hover {text-decoration:none; color:#FED200; }

Do I need an IE Hack? Do I have something wrong in my syntax? Any ideas are appreciated.

Thanks!
__________________
Jane Noel
http://www.InWestmoreland.com
Westmoreland County PA's Business Directory
Reply With Quote
  #2 (permalink)  
Old 04-27-2007, 07:33 AM
WebProWorld Member
 
Join Date: Aug 2003
Location: Bedfordshire, UK
Posts: 97
le_gber RepRank 0
Default

which version of IE are you testing in? I got the same - a working version - in FF1.5 and IE7
Reply With Quote
  #3 (permalink)  
Old 04-27-2007, 09:14 AM
WebProWorld Pro
 
Join Date: Nov 2004
Location: Westmoreland County, PA
Posts: 218
noel_x99 RepRank 0
Default

I forgot to check IE 7. I was in IE6.
__________________
Jane Noel
http://www.InWestmoreland.com
Westmoreland County PA's Business Directory
Reply With Quote
  #4 (permalink)  
Old 04-28-2007, 02:17 PM
WebProWorld Pro
 
Join Date: Aug 2003
Location: California,USA
Posts: 294
drummin RepRank 0
Default

Hello,
I had thought that maybe it was the class name "p" that was causing the problem. Changed all to "m" and still had same problem so I'm not sure why this happening.
I changed background color to #ff0000 and page looked great. If you can't resolve issue, maybe just use background color that matches menu background.
Reply With Quote
  #5 (permalink)  
Old 04-28-2007, 04:02 PM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 972
speed RepRank 1
Default

#menu a.p1:hover, #menu a.p2:hover, #menu a.p3:hover, #menu a.p4:hover, #menu a.p5:hover, #menu a.p6:hover {height: 1%; text-decoration:none; color:#FED200; }

The height: 1% negates the need for the background colour, it seems to work in IE6, IE7 and Firefox now.
Reply With Quote
  #6 (permalink)  
Old 04-29-2007, 12:43 AM
WebProWorld Pro
 
Join Date: Aug 2003
Location: California,USA
Posts: 294
drummin RepRank 0
Default

Once again, Speed has the answer!
Reply With Quote
  #7 (permalink)  
Old 04-29-2007, 12:08 PM
WebProWorld Pro
 
Join Date: Nov 2004
Location: Westmoreland County, PA
Posts: 218
noel_x99 RepRank 0
Default

Thanks Speed! That's an answer. I don't understand why it works, but it does.

Drummin, if I didn't find a way around, I had planned on coloring the background to match, but the design called for the background to be a gradient, so I was hoping for a solution.

Thanks to both of you for your efforts.
__________________
Jane Noel
http://www.InWestmoreland.com
Westmoreland County PA's Business Directory
Reply With Quote
  #8 (permalink)  
Old 04-29-2007, 12:24 PM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 972
speed RepRank 1
Default

The other fix that can sometimes work is position: relative, basically all the fixes do is trigger IE to recalculate dimensions or coordinates but calculate them correctly ... ish.

If you're not already, you do need to test in IE6 and IE7 because I've seen layouts explode in 7 that work fine in 6, usually it is because of a bad hack or some fudge to make 6 behave.
Reply With Quote
  #9 (permalink)  
Old 04-29-2007, 08:43 PM
WebProWorld Pro
 
Join Date: Nov 2004
Location: Westmoreland County, PA
Posts: 218
noel_x99 RepRank 0
Default

Thanks. I think I understand it. I just wouldn't have known where to look for an answer like that.

I do test in 7, but I have it on my laptop and I check there, but don't work there.

I almost always do my design work in FF with the IEtab. Once I'm reasonably satisfied, then I go to IE and look. Then eventually to 7. I've been fortunate that I haven't had any issues with 7.

I want to give up on IE 6 on my development computer but statistic are still showing a huge number of IE6 (and even IE5!) users still coming to our sites.

I appreciate your help!
__________________
Jane Noel
http://www.InWestmoreland.com
Westmoreland County PA's Business Directory
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:31 AM.



Search Engine Optimization by vBSEO 3.3.0