tiffany4321
08-04-2006, 07:52 PM
I'm using one of your css layouts (basic two column layout with header), and I was wondering how (if possible) to make only one section have a color background. I can't figure it out.
Also, i want to put a banner saying the name of my site on the header, and i don't know what size to make it so that the whole header is covered.
Any help would be appreciated :)
Chris
08-04-2006, 08:02 PM
In the code, find the CSS section of code, and add the bit in colour. I have added a coloured background to the "left" column. If you want this in the "centre" column then just move the code :)
<style type="text/css">
body
{ margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
}
#header {
margin: 20px;
padding: 10px;
height: 100px;
}
#left {
position: absolute;
left: 15px;
top: 160px;
width: 200px;
background-color: #HEXvalueHere;
}
#center {
top: 0;
margin-left: 230px;
margin-right: 15px;
}
</style>
As for the banner, that is slightly more tricky. Because the header width is 100% (automatically), it will be a different size for people who use different screen resolutions. For me, the width of the header would be 1024, and so the banner would be 1024x100 (the 100 comes from the stylesheet) but someone using a resolution of 800x600 would see a header of size 800x100.
I recommend making a banner of about 540 x 80, which would give a nice border around the image, and if you center it. :)