/    Sign up×
Community /Pin to ProfileBookmark

Background Images

Is there a piece of coding that I can add to a background image that will automatically resize it to full screen?

Thanks

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@gizmoJun 05.2005 — Sounds like a job for Javascript.
Copy linkTweet thisAlerts:
@CheaterJun 06.2005 — You could resize the image by hand in an image program, reupload it, then use it as the background.
Copy linkTweet thisAlerts:
@zingmatterJun 06.2005 — What about using CSS?
<i>
</i>&lt;style type="text/css"&gt;


img#bg {
position: absolute;
width:100%;
height:100%;
top: 0px;
left: 0px;
}
&lt;/style&gt;

&lt;body&gt;

&lt;img id="bg" src="myimage.jpg" alt=""&gt;



You may have to play around with the width and height percentages to get it to fit a little better (or alter the body margins?).

Hope this helps
Copy linkTweet thisAlerts:
@windermereauthorJun 06.2005 — thanks for your help. Bright ideas always happen when you've given up and are dropping off to sleep. A little thinking outside the square always helps
×

Success!

Help @windermere 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.23,
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,
)...