SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Relaive positioning using css

    Hi,
    I am new to css and would greatly appreciate any help I can get.
    I have attached a simply html file (x.htm) and its linked css file (style.css).

    Viewing x.htm displays the reult I am looking for, namely box 1 , box 2 and box3 in one line with box 4 below them. I however acheived this using absolute positioning, in stead of relative positioning.

    The problem occurs when either box 1 2 or 3 has more then 1 line, then box 4 is no longer correctly positioned.

    Thank you for your assistance.

    Jeff

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Jeff, and welcome to SitePoint.

    Unfortunately your files weren't attached. Can you please attach them using the file upload option or link to them so I can see what you have?

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Welcome to SitePoint Forums!

    You need to try to post those attachments again, because they're not there. Even better, post a link to the page, if at all possible.

    Relative positioning is not useful for entire layouts. It's for nudging boxes short distances to achieve certain effects. Web Design 101: Positioning on Digital Web Magazine may provide some more insight into CSS positioning.

    Absolute positioning can be useful for some types of layouts. For others, floats are better suited. If some things need to be displayed below other things, absolute positioning can get very tricky, or even impossible. It sounds as if you would be better off floating your boxes, but it's hard to say without seeing what you want to achieve.
    Birnam wood is come to Dunsinane

  4. #4
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Guys,
    My inexperience is showing with not successfully attaching the files.
    Anyhow I have managed to sort out my problems thanks to the very useful notes from AutisticCuckoo.
    I changed my thinking from absolute and relative positioning to floats and things started to move forward.
    Thanks again


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
  •