homepage Welcome to WebmasterWorld Guest from 54.205.122.62
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
A table whose columns wrap to fit container
JonW

5+ Year Member



 
Msg#: 4234799 posted 6:53 am on Nov 25, 2010 (gmt 0)

Wondering if its possible to use DIVs to construct a table, that when the container is not wide enough, the colums wrap onto the next line. If container is small enough, width each column wraps to its own line.

Full width
---------------------------------------------
ID fname lname DOB
1 jon w 1/1/1980



partial wrap
---------------------------------------------
ID fname
lname DOB
1 jon
w 1/1/1980




full wrap
----------------------------------------------
ID
fname
lname
DOB
1
jon
w
1/1/1980

 

topr8

WebmasterWorld Senior Member topr8 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4234799 posted 7:07 am on Nov 25, 2010 (gmt 0)

yes.

use a div as an overall wrapper for each 'full row'

then contain each value/column name from the row in a div of fixed height (must all be the same height) and float each one left.
repeat for each row.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved