While designing a site, I have encountered problems when mixing DIV tags for Menus and TABLES. So my questions is this. Disregard browser compatability, what are everyone's opinions on using DIVS instead of TABLES through out an entire web site? Also, if anyone has any pointers on how to mix DIVS and TABLES together, that would be even better. Thanks.
The problem I have with DIVS is it seems like everything on the page is so static in its positioning. So if I am worrying about desktop resolution, I have to make my page fit 1024x768. And any finer resolution, the page just looks empty.
I tend to use mostly divs, but for some things I need to resort to tables since IE is pretty bad at some of the advanced CSS positioning directives. This is especially apparent when trying to right or bottom justify things. Sigh. What specific problems are you having mixing them? Mine live in harmony when I need to resort to tables. bear
Well, my main problem is when I need to add my DHTML menu. I would like each of my MenuItems to each be in a table cell. And then the drop down part would reside in a DIV. The problem is, when the MenuItems are in a DIV, I have to position them on the page and not in the <TD>. Even when you put a DIV between a <TD></TD>, it really doesn't matter. You still have to position your DIV relative to the page and not relative to the <TD>. Does that make sense?
posted 16 years ago
the trick it to use % with your divs they adjust to the browser witdh
I am more concern with LEFT and TOP. It's easy to just center a TABLE in the middle of the page, or more towards what I am looking for, I can center a Table in a <TD> relative to that <TD>. I haven't found a way to do this with <DIV> yet.
Ok, let me explain my problem with what I am doing. I have a DHTML menu. That menu is part of a header file called main_header.inc.jsp. Since my menu consists of a bunch of DIV tags, the header file by itself looks fine. But when that file is included with my other pages the menu is out of place. I am sure it is because of the absolute positioning, but I don't know how to solve my problem. What I am talking about with the Table issue is the fact that if I did something like the folloing:
The div element, since it is a layer, does not actually position itself inside relative to the <td></td>. It is still relative to the page.
posted 16 years ago
did you do say the the div was relative to the cell? <div style="position:relative">