3 replies [Last post]
YuriY
Offline
newbie
Last seen: 17 years 16 hours ago
Joined: 2004-04-20
Posts: 3
Points: 0

Hi there, i am new in CSS designing web sites, and i have came to some bug that i cant resolve by my self. So...
It works in firefox, but it is not working in IE6
the code is :

.zgorajlink2 {
background-image: url(../images/druga/ambulantni.gif);
background-repeat: no-repeat;
height: 30px;
width: 158px;
top: 115px;
left: 256px;
position: absolute;
}

.zgorajLink2 a:hover {
background-position: -35px, 0px;
}

Link to testing site

i spend an hour or two, and i am really pissed off.. can any body help me pls.. i would be very pleased! Laughing out loud

dJomp
dJomp's picture
Offline
Enthusiast
Last seen: 5 years 11 weeks ago
Joined: 2003-03-23
Posts: 422
Points: 0

problems with background img in DIV - on mouse over in IE

It's because the bottom one will only work on an A tag within a .zgorajLink2 class, and there's no such thing on that page.

Basically you'll need javascript in IE to achieve what you want... I think... unfortunately I'm not a js man, there's enough people around here to help you out though!

You know you're a geek when you try to shoo a fly away from the monitor with your cursor.

Stu
Stu's picture
Offline
Enthusiast
Bristol uk
Last seen: 17 years 13 weeks ago
Bristol uk
Joined: 2004-01-20
Posts: 282
Points: 0

problems with background img in DIV - on mouse over in IE

Instead of styling

<div class="zgorajLink1"></div>

for instance.
You could style this as

a.zgorajLink1 {
display:block;
border:0;
cursor:default;
background-image: url(../images/Druga/predstavitev.gif);
background-repeat: no-repeat;
height: 30px;
width: 125px;
position: absolute;
left: 132px;
top: 115px;
background-position: 0 0;
}

<a class="zgorajLink1"></a>

and then use

a.zgorajLink1:hover {background-position: 0 -35px;}

It's not what you do it's the way that you do it.
So do it with STYLE
http://www.s7u.co.uk

YuriY
Offline
newbie
Last seen: 17 years 16 hours ago
Joined: 2004-04-20
Posts: 3
Points: 0

problems with background img in DIV - on mouse over in IE

o thank you..... i can see now... i have to come more familiar with usage of CSS. thanks again.. Cool