By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,312 Members | 1,900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,312 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.