Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Emulating an HTM table using CSS?
Old 10-17-2008, 03:16 PM Emulating an HTM table using CSS?
Ultra Talker

Posts: 316
Trades: 0
I want to make a 'table' using CSS and DIVS (although I'm strugling to think of reasons not to use a table).

It will be used to display results returned from a query of a database.

Cell1 | Cell2 | Cell3 | Cell4
Cell1 | Cell2 | Cell3 | Cell4
Cell1 | Cell2 | Cell3 | Cell4
Cell1 | Cell2 | Cell3 | Cell4

How would you create that using DIVS?

<div row>
<div col>
Cell1
</div>
<div col>
Cell2
</div>
<div col>
Cell3
</div>
<div col>
Cell4
</div>
</div>

Or something else?
Joe3000 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-17-2008, 03:19 PM Re: Emulating an HTM table using CSS?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Just use a table. There's nothing wrong with using tables for data, that's what they are for.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 10-17-2008, 03:39 PM Re: Emulating an HTM table using CSS?
Ultra Talker

Posts: 316
Trades: 0
Yeah, thought so!

Thanks
Joe3000 is offline
Reply With Quote
View Public Profile
 
Old 10-17-2008, 03:48 PM Re: Emulating an HTM table using CSS?
Brian07002's Avatar
Defies a Status

Posts: 2,140
Name: ...
Location: ...
Trades: 0
Using Div Tag:

Code:
<div row>
<div col>
Cell1 using divs
</div>
Using Table Tag:

Code:
<table>
<tr>
<td> Cell11 using table </td>
</tr>
</table>
Guess it's just a matter of preference, most will probably use divs, but tables have been around longer...It's not about whats easier/harder, it's about what will work and don't work...These both work, so take your pick.

Hth
__________________
Made2Own

Please login or register to view this content. Registration is FREE

Last edited by Brian07002; 10-17-2008 at 03:51 PM..
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 10-17-2008, 04:29 PM Re: Emulating an HTM table using CSS?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Tables were MEANT for data, so there's absolutely no reason to NOT use a table in this instance. It's no about what's been around longer or easier/harder - it's about PURPOSE and semantic markup.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Emulating an HTM table using CSS?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.48120 seconds with 12 queries