homepage Welcome to WebmasterWorld Guest from 54.242.188.217
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library : Charter : Moderator: open

CSS Forum

    
A table whose columns wrap to fit container
JonW




msg:4234801
 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




msg:4234807
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved