tables in xhtml and css

Associate
Joined
7 Nov 2004
Posts
1,755
Location
Southampton/Oxford
right im having trouble with my website for my assignment
right i'll tell you what i need to be done then yall can help me

#


my problem is that because i am using CSS and XHTML, i cant format it in XHTML so i have to use CSS, now Im having trouble in formatting the table to that which you can see in CSS, I don't know where to assign classes or id's in the html? anyone?
 
CSS is styling applied to elements in an (X)HTML document. A table is an element which consists mainly of <td> (a cell within a reow) and <tr> (a row) tags, so in your CSS you can do:

Code:
table {
color:#000
border: 1px solid black;
}

tr{
border:2px solid red;
}
etc.

If you want classes you can do it like with anything else:

In the document:
Code:
<table class="foo">

In the CSS:

Code:
table.foo{
font-size:14px;
}
And so on :)
 
Back
Top Bottom