/    Sign up×
Community /Pin to ProfileBookmark

How to put a background on a web page

Howdi,
How do you add a background layer over the background colour to house all the content??

[upl-file uuid=1f3b4cc3-7ce1-4a4e-ae4d-7b109f8872be size=86kB]background.jpg[/upl-file]

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@GararionApr 11.2009 — You could either use tables or divs. Example of the div way could be

First in your style sheet have this:

#content {

width: 700px ;

margin-left: auto ;

margin-right: auto ;

}

Change the width to what ever width you desire (based on your header image). Then create a div tag with the class of content. Your site will go here, centered on the page with the fixed font. You can then place other div tags within that display the images and place them exactly where you wish. IE)

<div style="background-image:url; position:absolute; left:50px; top:50px; height:100px; width:800px"></div>

The left and top attribute being the distance of the top left corner fo the div block from the top left corner of the div block it is contained in.

Hope this helps.
×

Success!

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

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

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