SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2007
    Location
    Wiltshire, UK.
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems with my layout

    Hi, I've been trying to re-invent the wheel and design my own layout with two full width divs above two part width columns above two full width divs.
    http://myweb.tiscali.co.uk/simonrive...inkscheme.html
    with the css at
    http://myweb.tiscali.co.uk/simonrive...linkscheme.css
    The first of the two lower full width divs spreads beyond the right hand side of the right hand column and I can't work out why, if any one can suggest a way to bring it back under control I would appreciate it.

  2. #2
    Object Not Found junjun's Avatar
    Join Date
    Mar 2002
    Location
    northern MI
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just remove the width: 100% on #sponsor and it will adjust to available width.

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2007
    Location
    Wiltshire, UK.
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot, so why does that happen?


    edit:
    More to the point, why is available width less than 100%?

  4. #4
    Object Not Found junjun's Avatar
    Join Date
    Mar 2002
    Location
    northern MI
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You added padding and border, which in the box model goes outside the width of the box. But really it's not a problem because you added width, which in your scenario here is redundant. A block element will always take up available horizontal space.

  5. #5
    SitePoint Zealot
    Join Date
    Sep 2007
    Location
    Wiltshire, UK.
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Again thanks, every day a little more is learnt.


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
  •