NEWB! How do I set a a fixed image as a my background?

jlchrisp23

New Member
I'm a total Newbie to web design so take it easy on me for asking such a ridiculous question but I'd like to set a fixed image as a background for my website in dreamweaver cs5. I am using tables and have it set to 984p wide. I'm using the table for all of my site content but I'd like to change the outer edges of the browser window to a fixed (non-tiled) background image. How do I go about doing that? Any suggestions or links to tutorials?

Thanks!:)
 
Last edited:

Edge

Member
I am using tables
Don't.
HTML has a set of elements each for different purposes. The table element is for showing tabular data e.g. a timetable. Without going into it in depth, if you use all the HTML elements for the purpose they were intended you will face fewer problems in the long run.

Back to your question:

use something like this:
body {
background: url(foo.jpg) 0 0 no-repeat;
}
 

PixelPusher

Super Moderator
Staff member
Don't.
HTML has a set of elements each for different purposes. The table element is for showing tabular data e.g. a timetable. Without going into it in depth, if you use all the HTML elements for the purpose they were intended you will face fewer problems in the long run.

Back to your question:

use something like this:
body {
background: url(foo.jpg) 0 0 no-repeat;
}

Very good point...OP heed this advice. As far as the css code below, you are missing one important part, the "fixed" value.
Code:
body {
   background: transparent url(bgImg.png) top center fixed no-repeat;
}
 

Phreaddee

Super Moderator
Staff member
Absolute 0
I hope you are talking about vodka!

absolute is never ever ever ever ever ever a good idea.

UNLESS you understand how it works, and why you would use it...
 
Top