Table in CSS
Hi,
How to horizontally center a table with CSS so that it's XHTML valid? Also, what are the CSS equivalents of cellspacing and cellpadding?
Login |
Table in CSSTable in CSSCurrently viewing this thread: 1 (0 members and 1 guests) AriodStatus: Offline!
Table in CSS Hi, How to horizontally center a table with CSS so that it's XHTML valid? Also, what are the CSS equivalents of cellspacing and cellpadding? schmeg007Status: Offline!
Set the TD element's padding attribute to simulate cellpadding. But in general, tables and CSS mix as well as water an oil. td{ ___________________ "Don't live your life by other people's quotes. Figure out life for yourself." ~Sum Wize Guy Wouldn't you use CSS to format the table? I'm sure you can use cellpadding and cellspacing anyway, but to get something similar to what you want:
You really shouldn't try to simulate cellpadding and cellspacing with CSS IMO... it has no benefits whatsoever and can yield unexpected results. However, for cellpadding, like someone said, use: td { padding: [x]px; } for cellspacing: td { margin: [x]px; } ___________________
Why is that? For the centering issue, use this:
|
Copyright ©1999-2008 Neverside. All rights reserved.
Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach
NeverAPI generated this page in 0.0071 seconds.