Old 10-26-2007   #1 (permalink)
Registered User
 

Join Date: Oct 2007
Posts: 44

Send a message via MSN to Neo824
CSS - Rollover image problem with IE

I use CSS to create a rollover image. Here is my code:

Code:
CSS - 
/* EOSS Style Sheet */

/* Banner */
.banner
{
margin: 0px 0px 0px 100px;
}

/* Navigation */

/* Home Button */
a.navigation_home
{
display: block;
margin: 0px 0px 0px 100px;
height:30px;
width:64px;
background-image: url(navigation_home.gif);
background-repeat: no-repeat;
}

/* Home Button -- Hover */
a.navigation_home:hover
{
background-image: url(navigation_home_hover.gif);
}

/* Downloads Button */
a.navigation_downloads
{
display: block;
margin: -30px 0px 0px 164px;
height: 30px;
width:  89px;
background-image: url(navigation_downloads.gif);
background-repeat: no-repeat;
}

/* Downloads Button -- Hover */
a.navigation_downloads:hover
{
background-image: url(navigation_downloads_hover.gif);
}

/* Endless Online Button */
a.navigation_endlessonline
{
display: block;
margin: -30px 0px 0px 253px;
height: 30px;
width: 114px;
background-image: url(navigation_endlessonline.gif);
background-repeat: no-repeat;
}

/* Endless Online Button -- Hover */
a.navigation_endlessonline:hover
{
background-image: url(navigation_endlessonline_hover.gif);
}

/* Navigation Bar -- Finish */
.navigation_barfinish
{
margin: -30px 0px 0px 367px;
}

HTML - 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style.css" />
<title>
EOSS - Endless Online Super Speed
</title>
<!--East Parade-->
<embed src="east_parade.mp3" autostart="true" hidden="true"/>
</head>

<body>
<!--Banner-->
<div class="banner">
<img src="banner.gif"/>
</div>

<!--Navigation-->
<!--Home Button-->
<a class="navigation_home" href="index.html">
</a>

<!--Downloads Button-->
<a class="navigation_downloads" href="downloads.html">
</a>

<!--Endless Online Button-->
<a class="navigation_endlessonline" href="http://www.endless-online.com">
</a>

<!-- Navigation Bar - Finish-->
<div class="navigation_barfinish">
<img src="navigation_barfinish.gif"/>
</div>

<!--Announcements-->

<!--Header-->
<div class="header_announcement">
<img src="header_announcements.gif"/>
</div>
</html>
This works fine in the Mozilla Firefox browser, but it doesn't work at all in Internet Explorer. Can anyone tell me how to fix this? Thank you.

Last edited by Neo824; 10-28-2007 at 03:13 AM.
Neo824 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 10-26-2007   #2 (permalink)
Rusty Bio-Hazard!
 
notjustgraphics's Avatar
 

Join Date: Sep 2006
Location: Toronto, Ontario, Canada
Posts: 1,161
Images: 26

Send a message via MSN to notjustgraphics
The above code works fine in both IE6 and Firefox

I suspect you've only posted a portion of the code and i think the full code (or a link to the page) would be helpful.

Cheers,

Mike.
__________________
notjustgraphics is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 10-26-2007   #3 (permalink)
Registered User
 

Join Date: Aug 2004
Posts: 143

add the link, visited, and active states to the CSS. Sometimes IE6 needs specific declarations based on other portions of CSS code.

Code:
a.navigation_home:link, a.navigation_home:visited {
display: block;
margin: 0px 0px 0px 100px;
height:30px;
width:64px;
background-image: url(navigation_home.gif);
background-repeat: no-repeat;
}

/* Home Button -- Hover */
a.navigation_home:hover a.navigation_home:active {
background-image: url(navigation_home_hover.gif);
}
Jolt is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 10-27-2007   #4 (permalink)
Registered User
 

Join Date: Oct 2007
Posts: 44

Send a message via MSN to Neo824
Quote:
Originally Posted by Jolt View Post
add the link, visited, and active states to the CSS. Sometimes IE6 needs specific declarations based on other portions of CSS code.

Code:
a.navigation_home:link, a.navigation_home:visited {
display: block;
margin: 0px 0px 0px 100px;
height:30px;
width:64px;
background-image: url(navigation_home.gif);
background-repeat: no-repeat;
}

/* Home Button -- Hover */
a.navigation_home:hover a.navigation_home:active {
background-image: url(navigation_home_hover.gif);
}
That messed it up entirely. :P
Neo824 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 10-27-2007   #5 (permalink)
Registered User
 

Join Date: Oct 2007
Posts: 44

Send a message via MSN to Neo824
Quote:
Originally Posted by notjustgraphics View Post
The above code works fine in both IE6 and Firefox

I suspect you've only posted a portion of the code and i think the full code (or a link to the page) would be helpful.

Cheers,

Mike.
I've edited my post, the entire code is now shown.
Neo824 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Background Rollover Jacorre Tutorial Submission 0 06-13-2007 07:11 PM
rollover problem LimitLess Adobe Photoshop 6 03-11-2007 03:08 AM
TUT: Image Rotation (image changes everytime page refreshs) allstar Tutorial Submission 4 06-03-2006 08:32 PM
Greatest Hits Rollover RedDeath Showrooms & Works In Progress 0 12-02-2005 07:28 AM
ImageReady rollover help please! Lantern Adobe Photoshop 2 04-07-2004 08:44 PM


All times are GMT +1. The time now is 10:48 AM.

Powered by vBulletin Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT