Welcome Guest, Not a member yet? Register   Sign In
How to make my site on the center of the screen
#7

[eluser]Lone[/eluser]
Haha whoops I left that one out! Best to link to some CSS reference page, but when you learn all the shorcuts for all the properties like background it makes for some really manageable and shorter code Smile

Dawnerd's first example will set auto to all four margin points instead of just to left and right like you would want. Heres a quick guide to the margin property (same for padding and border)

'Top' meaning the top margin, 'right' meaning the right margin etc.

Code:
#id {
   margin: top right bottom left;
}

So the following is top: 10pixels, right: 30pixels, bottom: 15pixels, left: 40pixels

Code:
#id {
   margin: 10px 30px 15px 40px;
}

But when you 'shortcut' you put only two sizes and they are the bottom/top and left/right values.
And then when just one value like dawnerd sample makes it that size for all (bottom/top/left/right)

Code:
#id {
   margin: 10px 30px 10px 30px;
}

//Same as

#id {
   margin: 10px 30px;
}


Messages In This Thread
How to make my site on the center of the screen - by El Forum - 01-22-2008, 08:52 PM
How to make my site on the center of the screen - by El Forum - 01-22-2008, 08:54 PM
How to make my site on the center of the screen - by El Forum - 01-22-2008, 09:10 PM
How to make my site on the center of the screen - by El Forum - 01-22-2008, 10:20 PM
How to make my site on the center of the screen - by El Forum - 01-22-2008, 10:22 PM
How to make my site on the center of the screen - by El Forum - 01-22-2008, 10:26 PM
How to make my site on the center of the screen - by El Forum - 01-22-2008, 10:40 PM
How to make my site on the center of the screen - by El Forum - 01-22-2008, 11:02 PM
How to make my site on the center of the screen - by El Forum - 01-22-2008, 11:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB