Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combing CSS with Tables.
Author Message
NBK*Twitch Offline
The Person Of All Kinds
*******

Posts: 526
Joined: Dec 2009
Reputation: 0
Post: #1
Combing CSS with Tables.
I am sure already you are going CSS with Tables?!?!?!?! Do not worry though this is just to make the table be able to look better. Kind of like how mybb does.

Okay first lets get out table ready =].

Code:
<head>
<title> blah </title>
</head>
<body>
<table>
<tr>
<td>
</tr>
</td>
</table>
</body>

Not hard is it :P?

Now as most of you should know a default table looks pretty boring =[.

So lets make some css to spice it up :).

Code:
<head>
<title> blah </title>
<style type="text/css" media=screen>
.thead {
background-color: #666
width: 400px;
hieght: 400px;
}

.tborder {
background-color: #333;
}
</style>
</head>
<body>
<table>
<tr>
<td>
</tr>
</td>
</table>
</body>

So now we have the css made.

So now lets call it with divs :).

Code:
<head>
<title> blah </title>
</head>
<body>
<table>
<tr>
<td>
</tr>
</td>
</table>
</body>

Not hard is it :P?

Now as most of you should know a default table looks pretty boring =[.

So lets make some css to spice it up :).

Code:
<head>
<title> blah </title>
<style type="text/css" media=screen>
.thead {
background-color: #666
width: 400px;
hieght: 400px;
}

.tborder {
background-color: #333;
}
</style>
</head>
<body>
<table class="tborder">
<tr>
<td class="thead">
sd;lnhgdn
</tr>
</td>
</table>
</body>

Now with the above the table should have a nice simple border. With a head with a grey color.

So now you might ask why would I do this?

Well if you do use tables you might notice when it comes to styling them(which you should not need to do to often) they are very limited. This is because tables are meant to be place holders. they aren't meant to be for styling.

However if you do want to style them to look somewhat better the above will do so.

So there you have my tutorial on styling tables. If you need any help recreating this just post below :).

İmage
Admin Forums
06-15-2010 04:32 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread:
Return to TopReturn to Content