SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    My true identity MaxS's Avatar
    Join Date
    Nov 2004
    Location
    New York
    Posts
    768
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How could this be?

    I'm making a very simple CSS page and I realized that it won't change to fit the person's resolution. I can't seem to figure out a way to fix this properly. I'd like to have the content box 35% from the top and the footer to be initially 75% away from the top but when the contentbox expands, I don't want it to overlap the footer? What could I do? I do realize I can make it so when it gets to a certain height it doesn't expand but it adds scrollbars. I'd rather not do that.

    Thanks!

    Code:
    #contentbox
    {
    	position: relative;	
    	top: 300px;
    	margin: 0 auto;
    	width: 25%;
    	border-style: dotted;
    	border-width: thin;
    
    }
    
    #footer
    {
    	position: relative;
    	top: 65%;
    	border-style: dotted;
    	border-width: thin;
    	min-width: 100%;
    	text-align: center;
    }

  2. #2
    SitePoint Addict
    Join Date
    Jun 2004
    Location
    UK, London
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Evil pixies in the garden are to blame. They are organised, I tell you!

    Seriously though, the question to ask it: 75% of what?

    the height of a document is initially the height of the content, not the browser viewport.

    More on this:
    http://www.quirksmode.org/css/100percheight.html
    http://www.alistapart.com/articles/footers/
    Chris Heilmann
    Blog | Articles | Binaries

  3. #3
    My true identity MaxS's Avatar
    Join Date
    Nov 2004
    Location
    New York
    Posts
    768
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Evil pixies in the garden are to blame. They are organised, I tell you!
    Those fools!


    I see. Thanks for filling me in! I'll see if there is any way to get around that.


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
  •