/    Sign up×
Community /Pin to ProfileBookmark

removing a background image automatically

How do I remove a background image if screen resolution is not 1152×864? Does Javascript allow you to do this?

I’m developing a website which uses a background image. The background looks good and is aligned ONLY if the screen resolution is 1152×864. Could someone create a script for me that would remove the background image if the user’s screen resolution is not 1152×864? Hope this makes sense. Thanks in advance!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@toicontienNov 13.2007 — This honestly sounds like a design or design implementation problem rather than a JavaScript problem. Can you post a link to the site in question, or a screenshot? There may be a non-javascript way to resolve this. JavaScript can always be disabled.
Copy linkTweet thisAlerts:
@mrhooNov 14.2007 — Much better to detect 1152X864 and then apply the background image.

It is always easier to add something with javascript than remove it without.
×

Success!

Help @GSdubs 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.28,
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,
)...