Website Margins

UnsolvedCypher

New Member
I'm a bit of a beginner at web design. Sorry if my question is kind of obvious. How do I get margins for my webpage like facebook.com , ubuntu.com , omgubuntu.com , mind42.com , answers.yahoo.com , or really any other site?

Thanks so much, ~Unsolved Cypher
 

ronaldroe

Super Moderator
Staff member
I think you're talking about the fact that the site is centered and in browser windows wider than the page, there is space on either side. If that is the case, there are a number of ways to do this. The easiest way is to wrap the whole page in a div, set a width for the div and set margin:0 auto;

It would look like this:

HTML:
HTML:
<div class="wrapper">
<!--The rest of your HTML here-->
</div>

CSS:
Code:
.wrapper{
margin:0 auto;
width:960px;
}
 

MazinSmileyFace

New Member
It didn't work

I am also working on the website with UnsolvedCypher. Thank you so much for your reply! We still need some more help with it though. We want out page to reach to the bottom of the screen, without just inserting many br s. You can find the page here: paperless.zzl.org/hidden/index.html
Sorry about the missing NAV images. They are not available because of the directory changes (paperless.zzl.org/index.html to paperless.zzl.org/hidden/index.html)

EDIT: The page might go up as paperless.zzl.org/index2.html
 
Last edited:

ancom

New Member
To make a footer that sits on the bottom no matter of screen height, just examine the source code on the site in my signuture. The important tags are html, body, #whole and footer. You have to set html and body height 100%, the padding of div that holds footer has to be the same size as footer height...look at my code
 
Top