Jump to content

[SOLVED] Wrappers not maintaining bg colour?


idire

Recommended Posts

I was trying to use a wrapper type css div to make a page 1000px wide with inside it other divs that remain with its formatting.

 

The divs I want are:

 

wrapper: 1000px wide

header: 1000px wide and 50px high

 

menu: 200px wide

table: 800px wide

 

I have these enabled as divs:

 

<div id="wrapper">

 

<div id="header">

</div>

 

<div id="menu">

</div>

 

<div id="booktable">

</div>

 

</div>

 

 

The problem I have is the background on the menu, and the table doesnt follow the same colour as the wrapper.

On the left side of the page, the white background ends where the menu div ends, then below it it goes back to the body colour

 

any idea why?

 

 

@charset "utf-8";
/* CSS Document */

html {
/*background-color:#CAFF70;*/
font-family:Arial, Helvetica, sans-serif;
}

body { 
/*text-align:center;*/
/*padding: 0 10px 0 10px;*/
background-color:#CAFF70;
font-family: Gill Sans MT, Verdana, Arial;
/*width: 1000px;*/
margin: 0 auto;
}

#wrapper {
width: 1000px;
background-color:#FFFFFF;
margin: 0 auto;
}

#header {
width: 1000px;
height: 50px;
}

#menu {
width: 200px;
float:left;
}

#booktable {
       width: 800px;
       float: right;
}

table {
/*margin: 0 auto;*/
width: 800px;
float:right;
/*background-color:#FFFFFF;*/
border-collapse: collapse;
text-align: left;
font-size:12px;
}

table tr.colour1 {
background: #E0EEEE;
}
table tr.colour2 {
background: #C1CDCD;
}
table tr td {
padding: 0 5px;
}
table tr td.cen {
text-align:center;
}

 

<div id="wrapper">
<div id="header">
	<h2 align="center">Resetting the Database</h2>

</div>

<div id="menu">
	hi
</div>

<div id="booktable">
<table>
	<tr>
		<th scope="col">#</th>

		<th scope="col">Creator</th>
		<th scope="col">Title</th>
		<th scope="col">ISBN</th>
		<th scope="col">Price</th>
		<th scope="col">Genre</th>
	</tr>

	<tr class=colour1>
		<td>1</td>
		<td></td>
		<td>"Doctor Who" Annual 2006</td>
		<td class="cen">1904419739</td>
		<td class="cen">36.99</td>
		<td>Doctor Who Comics & Graphic Novels Annuals</td>

	</tr>
</table>
</div>
</div>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.