So css cant properly mimic a table with many cells?
Main Topics
Browse All TopicsBasically Im wondering how advanced CSS can be when recreating complex tables.
http://www.wuggawoo.co.uk/
The bottom and top arent such big deals, the middle table is what Im interesting in how you'd do it.
Shoot. Ill up the points before I accept if you can do it really clean.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Oh btw just incase you misunderstood what I was doing, THAT IS NOT WHAT I AM aiming for.
Im planning to recode my forum; http://forumz.wuggawoo.co.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html
<html>
<head>
<title>Titled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body{
font-weight:bold;
}
div{
border:1px solid #000000;
}
.c1{
background-color:#999999;
}
.c2{
background-color:#cccccc;
}
.td{
float:left;
width:20%;
}
.toprow{
background-color:#666666;
}
</style>
</head>
<div>
<div class="c1" style="height:55px; text-align:center; padding-top:10px;">title</
<div class="c2">sub</div>
</div>
<br/><br/>
<div style="float:left; margin-left:5%;">
<div class="td toprow" style="text-align:center;"
<div class="td toprow" style="text-align:center;"
<div class="td toprow">nono3</div>
<div class="td toprow">no2</div>
<div class="td" style="text-align:center; clear:left;">title</div>
<div class="td" style="text-align:center;"
<div class="td">44</div>
<div class="td">44</div>
</div>
<br style="clear:left;"/><br/>
<div>
<div class="c2" style="height:55px;">botto
<div class="c1" style="text-align:center;"
</div>
</body>
</html>
As demonstrated above, it certainly is possible to achieve a table-like layout using divs (though I'd use display:table-cell) for the "td" divs. But just because you can do something doesn't mean you should.
A lot of people moving to CSS-driven layouts get lulled into thinking that EVERYTHING should be done in CSS. That defeats the purpose completely. I recently had my group convert all their development to CSS-driven layout, so we could code more efficiently and commonly. They were all using tables for their layouts. One of the biggest gripes was that they thought it meant we do away with tables altogether. My reply is simply this: You're missing the point. Tables are meant to display tabular data. Sure, they're a great way to achieve pixel precision with relative ease, but from a semantic point of view, they're the wrong type of element to use for layout.
So the question raised after that answer was what are we then trying to achieve with CSS-driven layout? A few things: 1. Proper, semantic coding; that is, using elements with their intended purpose in mind. 2. Lower the HTML-to-Code ratio. We have lots of extraneous code simply by virtue of having so many tables (and nested several levels deep at that!). By converting to CSS-driven layout, we'll see significant reductions in code base size; 3. CSS-driven layout enables to separate our design from the content. As it stands our design and content are married to each other. Tables keep us from being agile with our interface.
Sorry I've rambled a bit. But I want to revert to my point about semantic coding. When you're using something for a purpose for which it was not originally intended, you end up creating a lot more code (in bytes). As in the example above, that's a lot of code to achieve something a table does naturally, and with a lot less code to tweak:
<table>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
There's a simple framework. This also plays into the second point about HTML-to-Code ratio. In the case above, when you add it all up, there's a lot more code devoted to the div method than the table method. That's a good sign that it's not the optimal way to approach your problem. Granted there may be instances where you might have to do a bit of "tweaking." But frankly, if I find myself in that situation, I usually find that I have to rethink my presentation.
GoofyDawg
Business Accounts
Answer for Membership
by: COBOLdinosaurPosted on 2005-06-06 at 15:23:17ID: 14157723
Why would anyone want to re-create a 20 century layout using 21st century tools. If you want the look of table layout then use the tables. CSS to mimic old style layout is just a waste of effort.
CSS is about a different approach not just replace one set of tags with another to produce just another boring lifeless grid.
Cd&