View Full Version : tables and css
crashed29
04-30-2007, 09:10 PM
I am old html tables wizard from the late 90s. Up until now, it has worked well. But, i think I am finaling going to start using CSS for absolute positioning for some text items.
My question is, if I have a page built in tables, can I also use absoute positioning on the page for text? Or am I limited to formatting text in the <td> container?
VIPStephan
04-30-2007, 10:16 PM
You show the typical symptoms of a I’ve-heard-with-CSS-you-can-position-things-where-you-want guy that is thinking of this from an entirely wrong point of view. OK, yes, you can position things absolutely but:
It should only be done if you really and absolutely know what you are doing.
It’s not as easy as you think and can lead to more problems than not using positioning.
It should be used very wisely and not for everything just because you think you can.
Absolute positioning is absolutely not necessary for most layouts.
CSS is only really useful of you use it in combination with semantic code (http://brainstormsandraves.com/articles/semantics/structure/), that means no tables for layout!
OK, you can position text in table cells (if not the table cells themselves then at least if you put a div or span around the text in the cells) but your goal should be to look into real CSS layouts (http://www.google.com/search?q=css+layouts).
kraftomatic
04-30-2007, 10:25 PM
Agreed. No absolute positioning. It's bad in most cases. And tables are *only* used for tabular data. Nothing else.
(it took me awhile to understand that myself, but I came around).
Cheers.
ronaldb66
05-01-2007, 09:53 AM
Maybe you could supply a link to the page in question so we can make some suggestions for approaching the layout using various CSS positioning techniques.
It takes a bit of getting used to when transitioning from traditional table layout techniques to CSS positioning techniques; one has to step back from regarding a page as closely related cells in a row-and-column arrangement, and learn to view it as a series of unrelated, positioned blocks.
For this, it's important to grasp the CSS box model: one of the better descriptions I know is Brainjars CSS Positioning (http://www.brainjar.com/css/positioning/).
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.