PDA

View Full Version : Background


maclachlan
06-20-2006, 01:40 AM
I'm new to the website design and have a newbie question. How do I add a background that would look something like the one used on www.barrycullen.com. I want my website to be centred but have a pattern to the background. Also would this example website be created using layers or tables, I really like how it flows together.
Thanks
Rob

edbr
06-20-2006, 04:47 AM
the site you mention is using layers, and I would guess he is using tiled background image. You can do this by adding it to your css

chriskq
06-20-2006, 07:41 AM
if u right click on the background on that chevy site u gave - you will notice how small there background image is. They have styled it using css and made it repeat on the y and x axis.

are u going to use divs and css in ur site (thats the better option, much more flexible than tables [but can be cross-browser painful)

here is the code that u can use for ur css that will get u up and running with a centered webpage. God im nice arn't i. :P

html {
height: 100%;
}

body {
margin: 0;
padding: 0;
background: #43e24f url(../images/background.jpg);
height: 100%;
font: normal 0.75em verdana,helvetica,sans-serif;
color: #666;
text-align: center;
}

#globalWrap {
display: block;
width: 744px;
margin: 0px auto;
padding: 0;
background: #fff;
text-align: left;
}

the globalWrap div goes inbetween the body tags (ie - it wraps up ur page)