/    Sign up×
Community /Pin to ProfileBookmark

How do you make the whole background clickable

Hi,
Been tryin to find a good resource to tell me how to make a background clickable.. does any body here know? I don’t want just the image but the whole background kinda like body{background: url(‘image/bg.jpg’)} is there
any alternative here?

any help would be very much appreciated.

thanks,
-s

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@aj_nscMay 16.2008 — It would help if you were telling us what effect you are trying to accomplish. I'm sure it would become much clearer as to how to achieve this effect. Without knowing anything more than I do already one idea is to make an anchor (just like the following -> <a href="#" id="wholepage">&nbsp;</a>) and put the rules:

<i>
</i>display: block;
position: absolute;
width: 100%;
height:100%;


although you must specify a 100% width and 100% height on your body and html and have this anchor the first element after the opening body tag.

But enlighten us some more and tell us what you are trying to do.
×

Success!

Help @saintcoder 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.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...