Forum Moderators: not2easy
Moving from tables for layout to css layout is a big step
i want to get away from using tables whitin tables.
rather use divs within tables
my content, navigation is around tables
getting away from that would be a huge step that i dont want to go now
any suggestions or comments on using divs within tables, i could not think of a way to position the divs since i have used tables to position everything.
thank You all
Now, the wonderful thing about divs and CSS is that very little positioning is needed. A simple example of a fluid layout, using only divs and CSS:
<div id="content"></div>
<div id="navigation"></div>
<style type="text/css">
#content {
position: absolute;
top: 0px;
left: 150px;
}
#nav {
width: 150px;
}
</style>
Or, if you want three columns:
<div id="content"></div>
<div id="nav-left"></div>
<div id="nav-right"></div>
<style type="text/css">
#content {
position: absolute;
top: 0px;
left: 0px;
margin: 0px 150px;
}
#nav-left {
float: left;
width: 150px;
}
#nav-right {
float: right;
width: 150px;
}
</style>
If you want other divs inside the content div it is easy to make it look good by assigning either a height or width (preferably not both), or to use absolute positioning.
I have discovered all that and my main problem is that i have used tables around everything to position my website.
using absolute positioning for the divs will not work together with all the tables i have around them.
So basically speaking, i have to place the divs within the tables in order to positon them relatively to the tables.
That means i am not able to use absolute div positioning. The layout will not look the way i want it to.
I would get around all that using a css only layout, which would be a big step and i am not ready to go there yet.
My question is, if it is acceptable to use divs within tables and does it have any disatvanatges? browser cross compatibility. i checked it out yeserday and everything seems to be displayed fine in ns7, opera and ie6. i am really happy with the results.
Thank you!