Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

DIVS or TABLES

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The new trend is using divs, but I still am a table man.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marshal
Posts: 67343
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the trick it to use % with your divs
they adjust to the browser witdh
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what you are talking about....
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you do say the the div was relative to the cell?
<div style="position:relative">
 
I'm full of tinier men! And a tiny ad:
Level Up Your Code with a Pro Java IDE
https://www.jetbrains.com/idea
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!