[css-d] Vertical centering in a table cell using CSS

2005-12-07 Thread Sam Carter
Is there a way to vertically center content in a table cell using CSS (not HTML)? Sam __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported

Re: [css-d] Vertical centering in a table cell using CSS

2005-12-07 Thread CJ Larson
Is there a way to vertically center content in a table cell using CSS (not HTML)? A CSS table cell or an HTML table cell? CSS: [assume markup - div class=vcenter] .vcenter {display: table-cell;vertical-align: middle;height: 100%;} HTML: [assume markup - td class=vcenter] .vcenter

Re: [css-d] Vertical centering in a table cell using CSS

2005-12-07 Thread rolfsf
okay, so slightly OT here... could someone explain the use of display:table-cell? I can never seem to get my brain around the how's and why's Like, why wouldn't you use a table instead of divs acting like tables and table cells? thanks! Is there a way to vertically center content in a

Re: [css-d] Vertical centering in a table cell using CSS

2005-12-07 Thread Sam Carter
CJ Larson wrote: Is there a way to vertically center content in a table cell using CSS (not HTML)? A CSS table cell or an HTML table cell? This is a td cell CSS: [assume markup - div class=vcenter] .vcenter {display: table-cell;vertical-align: middle;height: 100%;} This doesn't

Re: [css-d] Vertical centering in a table cell using CSS

2005-12-07 Thread CJ Larson
This doesn't seem to center vertically in either IE 6 or Firefox... Do you have a sample page online? I noticed you cut out the HTML td example from my original reply and only left in the CSS one. Are you sure you were using the right example? The full code for my td table was more like this

Re: [css-d] Vertical centering in a table cell using CSS

2005-12-07 Thread Marjorie MacDonald
Why do you need this style=height: 100%;vertical-align: middle; at all? Isn't the default for vertical alignment in a cell center? If you don't do anything, and haven't set anything in your CSS, the cell should be vertically centered by default. Marjorie MacDonald --- CJ Larson [EMAIL