I screwed up in my last test (and posted bad code - forgot the width:50% which I had temporarily taken out on a test). It works great now. Thanks for your help. Angela French
>-----Original Message----- >From: css-d-boun...@lists.css-discuss.org [mailto:css-d-boun...@lists.css- >discuss.org] On Behalf Of Jukka K. Korpela >Sent: Monday, September 19, 2011 11:00 PM >To: css-d@lists.css-discuss.org >Subject: Re: [css-d] seeting width on display:table-cell > >20.9.2011 3:08, Angela French wrote: > >> If I only have one row, do I need to use the display:table-row > > as a parent container, or can I just use the table-cells? > >Someone can surely come up with a theoretical answer, but I would simply >wrap any cell inside a row and any row inside a table, e.g. > ><!doctype html> ><title>cells</title> ><style> >.table { display: table; width: 100%; } >.row { display: table-row; } >.cell { display: table-cell; border: solid; width: 50%; } </style> <div >class=table> <div class=row> <span class=cell>foo</span> <span >class=cell>bar</span> </div> </div> > >> Also, I have two cells and wand each a width of 50%, but the browser > > is not rendering it as directed. > >Firefox 6 and IE 9 show the above with such widths. IE 7 and earlier don't >support display: table-cell and relatives, so tabular formatting in CSS isn't >practical on web pages yet, in most cases. > >I suppose you didn't set a width on an enclosing element. Without such a >setting, width: 50% raises the question "50% of _what_?" > >-- >Yucca, http://www.cs.tut.fi/~jkorpela/ >____________________________________________________________________ >__ >css-discuss [css-d@lists.css-discuss.org] http://www.css- >discuss.org/mailman/listinfo/css-d >List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css- >discuss.org/policies.html >Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/