SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard subnet_rx's Avatar
    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.

  2. #2
    SitePoint Wizard subnet_rx's Avatar
    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.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,281
    Mentioned
    179 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 it
    Yes there is You 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.
    Tables are good at doing certain things and if you specifically want that behaviour then for the time being use a table. Mozilla and other browsers have better css support than IE so your gripe should really be aimed at IE's lack of good css support rather than against css.

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •