Forum Moderators: not2easy

Message Too Old, No Replies

CSS rollover images not showing in IE and Opera

New to the forum and need help!

         

ericgeneric

11:45 pm on Apr 11, 2005 (gmt 0)

10+ Year Member



Hi all,

As you can probably tell I am new to this forum. In fact, I am also very new (2 weeks) to html. I think I am getting on alright apart one major problem: The images for the buttons on the nav in IE and Opera do not display. I did test the site in IE6 previously and they worked fine. Now they are gone!

ericgeneric

11:51 pm on Apr 11, 2005 (gmt 0)

10+ Year Member



Sorry about that...

I just posted a whole load of code and then went on to read the Charter while I waited for someone to reply! I have since deleted all my code and will try to reformat it in a more suitable manner (ie. delete all the un-necessary junk).

Richard

ericgeneric

12:01 am on Apr 12, 2005 (gmt 0)

10+ Year Member



Here is the html/css:

div#nav-box
{
height: 40px;
margin: 0px auto 0px auto;
width: 620px;
}
#nav-box ul
{
list-style: none;
}
#nav-box li
{
display: inline;
}
.hidden
{
display: none;
}
a#home img {height:18px; width:63px; background:url(home_button.gif);}
a#home:hover img {background: url(home_hover.gif);}
a#home:active img {background: url(home_down.gif);}
a#home:visited img {background: url(home_visited.gif);}

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Homepage</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" >
<link href="style\style.css" rel="stylesheet" type="text/css" >
<!--[if IE]>
<link rel="stylesheet" href="style\ie.css" type="text/css">
<![endif]-->
</head>
<body>
<div id="wrapper">
<div id="header-box"> <a href="index.html"><img src="images/top_logo.gif" alt="Eric Generic"></a>
<div id="nav-box">
<ul>
<li><a id="home" href="index.html" title="Home"><img src="home_trans.gif" alt="Home"></a></li>
<li><img src="menu_spacer.gif" alt="¦"></li>
</ul>
</div>
</div>
</div>
<div class="hidden">
<img src="home_button.gif" alt="" >
<img src="home_hover.gif" alt="" >
<img src="home_down.gif" alt="" >
<img src="home_visited.gif" alt="" >
</div>
</body>
</html>

The main style.css file is identical minus:

html
{
overflow: auto;
}

and plus:

body div#footer-box
{
position: fixed;
}

Also, I understand that the body div# is hidden from IE which does not matter now I have seperate style sheets. How do I make it into a normal unhidden style? If you have another, more graceful, way to do this please do tell!

I think the problem may be something to do with the transparent image rollovers but I can't tell. I have been trying to resolve this for two days now.

Sorry for the long first post, I hope someone knows what is wrong with my code.

Thanks in advance,

Richard

ericgeneric

5:00 pm on Apr 12, 2005 (gmt 0)

10+ Year Member



Maybe I'm not going to get an answer on this one. Nevermind, I can sit here and work it out no problem. Just take a bit of effort, will post here when I discover my error.

hils

5:10 pm on Apr 12, 2005 (gmt 0)

10+ Year Member



elementary answer - but have you double checked the path to your images? I notice that some are images/... and some are not.

Just a suggestion :)

ericgeneric

9:30 pm on Apr 12, 2005 (gmt 0)

10+ Year Member



Thanks for the reply. All paths are correct, the lack of images/.. was due to a sloppy clean up of extraneous code. I have no idea where the problem lies as I have experimented with the code about as much as I can muster for the time being. Another strange quirk is that when I preview from dreamweaver in any of my installed browsers none of the images for the nav show, emulating the problem I've been having when I drop files from windows into IE and Opera.

I have to go away for a few days tomorrow, see you when I get back.

Rich