467,876 Members | 1,218 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,876 developers. It's quick & easy.

how to achieve identical layouts achieved by <table> using <div>

Hi Folks,
can you help me by explaining how the code below can be translated
using <div> and achieve the same effect?

Thanks,
LA

<html>
<body>
<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>
</body>
</html>

Jul 21 '05 #1
  • viewed: 7348
Share:
2 Replies
listaction wrote:
Hi Folks,
can you help me by explaining how the code below can be translated
using <div> and achieve the same effect?

Thanks,
LA

<html>
<body>
<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>
</body>
</html>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<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>
</html>

--
Gus
Jul 21 '05 #2
listaction wrote:
Hi Folks,
can you help me by explaining how the code below can be translated
using <div> and achieve the same effect?


Have a look at the section on table in the CSS 2 specification (display:
table/table-row/table-cell).
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Ian Rastall | last post: by
61 posts views Thread by Toby Austin | last post: by
15 posts views Thread by scott | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.