SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Dynamic positioning with divs
-
Sep 29, 2004, 11:34 #1
- Join Date
- Aug 2001
- Location
- Hattiesburg, MS
- Posts
- 1,085
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Dynamic positioning with divs
Is there a way to add a property to a div that will position it according to the div above it? I'm trying to create content pages for my site, but the text on some is much longer than others. Giving a new id to each one just seems too tedious, there must be something I'm missing.
-
Sep 29, 2004, 20:08 #2
- Join Date
- Aug 2001
- Location
- Hattiesburg, MS
- Posts
- 1,085
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I don't get it, why tell everyone to use CSS if it doesn't solve half the problems that tables already have solved.
-
Sep 30, 2004, 10:50 #3
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Is there a way to add a property to a div that will position it according to the div above itYou simply give them no position at all and then they follow each other. Really the only element whose own dimesions are dependent on anothers is a table.
If you had some code we could take a look and see what you want but I think you've made your mind up already lol
I don't get it, why tell everyone to use CSS if it doesn't solve half the problems that tables already have solved.
I see no harm in using a simple table (hybrid) layout when that is the best option for the task in hand but you can still fully style the table with css and have the best of both worlds. Although the w3c recommends using tables only for tabular data it does not outlaw it for layout but asks that you make sure it accessible.
I believe the standards say something like " Don't use tables for layout unless they make sense when linearised". So this gives you some leeway in using tables but is followed by the statement "once UA's support stylesheet positioning then tables should not be used for layout". Obvioulsy IE still has some way to go here
Read more here:
http://www.w3.org/TR/WAI-WEBCONTENT/#gl-table-markup
Paul
Bookmarks