relative positioning with CSS

Discussion in 'HTML' started by Tom, Oct 10, 2003.

  1. Tom

    Tom Guest

    Hi
    I have a 2 column layout - white on one side and grey on the other.
    I want to insert 2 further columns into the grey side as nested divs.
    Is the positioning of the div relative to the div that it is nested within,
    or to the page itself
    For an example of what I am trying to achieve:
    www.irishmx.com/demo.gif
    Any thoughts welcomed
    Thanks
    T
     
    Tom, Oct 10, 2003
    #1
    1. Advertising

  2. Tom

    m Guest

    Tom wrote:
    > Hi
    > I have a 2 column layout - white on one side and grey on the other.
    > I want to insert 2 further columns into the grey side as nested divs.
    > Is the positioning of the div relative to the div that it is nested within,
    > or to the page itself
    > For an example of what I am trying to achieve:
    > www.irishmx.com/demo.gif
    > Any thoughts welcomed
    > Thanks
    > T
    >
    >
    >

    The position of any object on your page, not just <divs> is
    relative to the immediate containing element. The nesting can
    be carried as deep as your visitor's sanity allows.



    --
    Cheers from m at http://www.mbstevens.com
    via Pinguin and Dragon -- 0% Gatesbloat.
     
    m, Oct 10, 2003
    #2
    1. Advertising

  3. Tom

    brucie Guest

    In post <bm6na9$ntc$>
    Tom said...

    > I have a 2 column layout - white on one side and grey on the other.
    > I want to insert 2 further columns into the grey side as nested divs.


    any particular reason why? a 3 col layout would be much more robust
    and easier.

    > For an example of what I am trying to achieve:
    > http://www.irishmx.com/demo.gif


    go for 3 cols

    --
    brucie.
    11/October/2003 08:08:57 am
     
    brucie, Oct 10, 2003
    #3
  4. Tom wrote:

    > Is the positioning of the div relative to the div that it is nested within,
    > or to the page itself


    The position of a relatively positioned element is relative to where it
    would have been placed if you didn't try to fiddle with its position.

    OTOH, absolutely positioned elements are positioned relative to the top
    left corner of their nearest non-statically positioned ancestor.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Oct 10, 2003
    #4
  5. Tom

    Tom Guest

    Thanks guys for the tips/advice.
    >
     
    Tom, Oct 13, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob R. Ainscough
    Replies:
    2
    Views:
    1,685
    Rob R. Ainscough
    Feb 7, 2006
  2. Chris
    Replies:
    10
    Views:
    1,117
    Chris
    Mar 1, 2004
  3. Tim Johansson

    Relative CSS positioning

    Tim Johansson, Aug 2, 2004, in forum: HTML
    Replies:
    7
    Views:
    445
  4. KatB
    Replies:
    8
    Views:
    4,230
  5. Rob Powell
    Replies:
    4
    Views:
    20,544
    dorayme
    Sep 17, 2006
Loading...

Share This Page