/    Sign up×
Community /Pin to ProfileBookmark

Large image on hover help

Hi Guys, This is my first post here so please be gentle lol.

I have an issue where I have a background image wrapped within an A tag and upon hover I want a different image displayed which is a few pixels larger.

This is for an intranet so needs to be IE6 compatible 😮

Help guys.

Cheers

Ran

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@R4N_S_SauthorMar 12.2010 — PS> if it matters i can remove said image as a background and insert into the html instead
Copy linkTweet thisAlerts:
@tirnaMar 13.2010 — Without seeing the actual code you are using I have to make a couple of assumptions.

I'm assuming the <a> element is wrapped inside some block level element like a div p etc otherwise the bg image will only be as big as the text or contents of the <a> element

Assuming <a> is inside a div with an id="a_container", a styled width and height then try the following styles

[CODE]#a_container {
background-image: url("bg_1.jpg") }

#a_container:hover {
background-image: url("bg_2.jpg") }[/CODE]
Copy linkTweet thisAlerts:
@FangMar 13.2010 — The <a> would have to use the :hover. IE6 only supports :hover on this element.
×

Success!

Help @R4N_S_S 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.18,
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,
)...