SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru mwolfe's Avatar
    Join Date
    Mar 2005
    Posts
    912
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css layout fixed width, 100% height (with margins on top and bottom)

    Alright, i know how to make a website with 100% height without a full page of content (using paul's layout found here )
    However, i want to make a layout similar, but with one catch.. I am planning on rounding the borders of the main div (essentially the wrapper) and so i want to put some margin on the top and bottom.. However i've played around with it some and can't seem to come up with a way to add say a 20px margin on the top and bottom and still achieve this effect.. I found a way to do vertical centering, and i got it working.. unfortunately however that only leaves me with top and bottom margins if the whole page isn't filled.. if it is filled then its no good.. I could have sworn i've seen people with websites like this before.. but maybe that was my imagination.. Is it possible without javascript?

    Thanks in advance

  2. #2
    SitePoint Enthusiast icovey's Avatar
    Join Date
    Jul 2006
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey mwolfe,

    How precise do you want to be with your margins? If it's not too much of a problem whether they are exactly 20px you could try using percentages for the margins and reducing the height and the min-height of the container div.

    Cheers,
    Cheers,
    Ian.

    7879 | Web Marketing Lichfield


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
  •