hwg-style archives | Jan 2002 | new search | results | previous | next |
Converting Centered Table Rows to Divs/CSSby "Rod Hutson" <rbhutson(at)ieee.org> |
|
I can't believe I can't figure this out, but how do you convert a centered, single table row of nicely spaced cells into a set of inline divs in a CSS page? In other words, how do you convert this: <center> <table width=95%><tr><td>elem1</td><td>elem2<td><td>elem3</td><td>elem4</td></tr></ table> </center> to this: <div align=center> (or <div> with appropriate CSS margin-left:auto + margin-right:auto) <div>elem1</div><div>elem2</div><div>elem3</div><div>elem4</div> </div> I realize I can also use <span></span> for inline elements, but my real problem is that I can't figure out how to space a few (say 4) elements across a variable width page using only divs and CSS, whereas using a table to do this is trivial. Suggestions would be great!! Rod email: rbhutson(at)ieee.org
HWG hwg-style mailing list archives, maintained by Webmasters @ IWA