FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

table in CSS

 


kk_loke86
Hello, does anyone know how to change table background color in CSS external file?
brutal_sound
You can do this so:

Code:

#yourtable {
background-image:url(images/bg.jbg);
background-repeat:no-repeat;
}


and HTML code

Code:

<table id="yourtable">
<tr><td>TEXTTEXTTEXT</td><td>TEXTTEXTTEXT</td></tr></table>
woodenbrick
If you prefer not to use images try this:
CSS:
Code:

table.yourtable th { background-color: #eee;}
table.yourtable td {background-color: #efe;}

HTML:
Code:

<table class="yourtable">
<tr><th>Heading 1</th><th>Heading 2</th></tr>
<tr><td>Data 1</td><td>Data 2</td></tr>
</table>
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.