Home
Manage Your Code
Snippet: Table Layout Using Div Tags and CSS (CSS)
Title: Table Layout Using Div Tags and CSS Language: CSS
Description: Shows how to make a table using div tags and css instead of the usual table tag. Views: 1004
Author: Steve Vasquez Date Added: 8/29/2007
Copy Code  
<!-- Usual table tag -->

<table bgcolor="#000000" width="100%" cellspacing="1">
<tr>
<td width="33%" bgcolor="#FFFFFF">test</td>
<td width="33%" bgcolor="#FFFFFF">test </td>
<td width="33%" bgcolor="#FFFFFF">test</td>
</tr>
</table>

<!-- CSS Div Way -->

<head>
<title>For Non-tabular matter</title>
<style type="text/css">
.equalboxes {border:1px solid black;width:33%;float:left;}
</style>
</head>
<body>
<div class="equalboxes">test</div>
<div class="equalboxes">test</div>
<div class="equalboxes">test</div>
</body>