I'm not really sure how to ask this so bear with me and I'll answer questions as quickly as possible. I want a background that is as wide as a viewer's screen is. I also want a different colored background that is only behind the content of my web page. Basically, I want one that automatically adjusts to the user's screen and another that is always 800 pixels wide. I use HTML or and external CSS style sheets.
mariko
0
Light Poster
Recommended Answers
Jump to PostYou use a 'wrapper' or 'container' div for the entire page and then set that to say 800px:
CSS
body{ background-color: red; text-align: center; } #wrapper{ margin: 0 auto; width: 800px; text-align: left; background-color: yellow; }
HTML
... dtd and head ... <body> …
All 4 Replies
diafol
Lusiphur
commented:
Beat me to it and good example!
+1
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
diafol
tezac
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.