Setting background image size in Dreamweaver

How to stretch it across the screen


jamie
Been trying to set a background image on Dreamweaver 8 for days. The problem is that I want it to fit to the screen but even if I make it a huge image there always seems to be a white border. Any help is appreciated.
Small Town Boy
Have you tried setting the size to 100%, rather than a certain number of pixels? Because obviously different screens will render the image a different size.

Although net etiquette says no background images because they're disturbing...
krostitzer
etiquette schmetiquette. try something like this in the css. it will get rid of the padding:
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p, blockquote,{margin:0;padding:0;} // no padding on anything!

body {
background-image: url(../images/bg_stripe.jpg);
background-repeat: repeat-x; // or repeat-y or none
}

the background image url is relative to the location of the CSS file and not the calling html

also, in the html body tag, put this:

<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>

I can't remember if newer browsers don't need this last bit in the body tag any more, but I've been putting it in there anyway.
jamie
Nice one. Will try these suggestions and get back with results. Thanks!
TT Logo
You are viewing a low fidelity version of this page. Click to view the full page.