HI! All,
I am creating a new website and i am trying to comeup with a 2 cols/ 3 rows layout, so i have a header/ content area/ and footer, and the content area is divided into 2 cols leftnav and content pane. The problem that i am facing is when i create the 2 cols with div, IE puts some 3px gap between the left nav div and the contentpane div, so what i came up with is to put the 2 divs in a table and that solves the problem, but what i am left with is a hybrid layout of divs and tables, is this good or bad, Does anyone have any experiences to share.
Thanks.
its not good to mix div's and tables. you should just stick to one or the other. if you aren't using a css file to distinguish the layout of your page its best just to use tables. also its important to make sure you declare any spatial modifiers when using tables without a css file. Such as cellpadding or cellspacing.
i dun like div , table is just perfect as u can set its width freely .
Thanks for the responses,
Ok let me describe what i am trying to do.
--------------------------------------------------------
| header area
|-------------------------------------------------------|
| | |
| left | content |
| | \
| | |
| | |
|-------------------------------------------------------|
| footer area |
|-------------------------------------------------------|
The header area is fixed. The left and contet area are fixed in height but not
in width, also the page itselfe will have no scrollbars, the content area( DIV )
will have both the vertical and horizontal scrollbars. I am not aware of a solution for this using tables, so i started with divs i get the layout the way i want but then there is this odd 3 px gap between the left and content div so i wrap them in a table and everything is good, i have only tested this on IE, i have to see how it behaves on other browsers.
Suggestions/ opinions/ criticisms welcomed.
thanks.
before getting into it with tables, try putting cellspacing=0 cellpadding=0 margin=0 in the div tags to make sure that everything is set to 0.
see if that works
lol , but i never say div can't do this . im just saying i dun like div .
GAH....you must keep div's and tables seperate! Tables should not be molesting the superiority of divs!
Indeed...tables are fastly becomming old technology in light of CSS.
CSS just cleans the source code up so nicely. And oh the formatting options!
Me love it!
Oh yea...forgot to drop in there, if anybody needs some help using div's or CSS just drop me a pm. I'd be more than happy to help.