Background Shade For Table Headers In HTML ?

Associate
Joined
22 Dec 2009
Posts
1,240
Location
Upper Skurt
Hi,

Would anyone please be able to look at the below html code that I am using for a two column table. I have everything OK except I cannot get the background column header boxes to shade with a colour.

It is only for a single one off web page so I am trying to get it into the page via html rather than a link to a CSS sheet. If I can get the code so that it creates a background shade of grey or indigo for the column header boxes that would be perfect

<table width="239" border="1">
<tr>
<th width="85" scope="col"><div align="left">Day</div></th>
<th width="138" scope="col"><div align="left">Schedule</div></th>
</tr>
</table>


Rgds
Bintos
 
Associate
OP
Joined
22 Dec 2009
Posts
1,240
Location
Upper Skurt
Tables with divs inside? You might want to change that.

Thx for the reply, I inserted the table using Dreamweaver and accepted whatever code it put in. I have never created any html before so have not got a clue how to use it, I was trying to create a page using Dreamweaver and somehow it placed the divs in the code. That Dreamweaver is a bit complex, them web gurus who use it gotta have heeds like Einstein to get to grips with that.

I pasted the code you provided into a CSS sheet and linked it to my page and it work OK, many thanks for your help, most appreciated. Now that the table looks OK, I am tempted to leave them <divs> in it for fear of banjaxing it up if I try to take them out?


Thx
Bintos
 
Last edited:
Soldato
Joined
18 Oct 2002
Posts
15,414
Location
The land of milk & beans
Taking them out will only mess things up if the text of a parent element is centrally or right aligned.

That Dreamweaver is a bit complex, them web gurus who use it gotta have heeds like Einstein to get to grips with that.
'Web gurus' will hand write code, as WYSIWYG editors have a tendency to spew out complete crap.

If you're interested in learning HTML, check out the HTML5 reference here.
 
Back
Top Bottom