Creating a centered DIV
Thursday, April 23rd, 2009 by Jonathan LauThis post briefly show you how to created a DIV which centers itself on the page.
It relies on pure CSS and does not require any JavaScript.
To center it vertically, you would need to set a fixed height for your page.
HTML:
<div id="centered">Your centered DIV</div>
CSS:
#centered{
width:700px;
height:400px;
position:absolute;
top:50%;
left:50%;
margin-left:-350px;
margin-top: -200px;
}







August 13th, 2010 at 3:50 am
Bereken zelf uw hypotheek. Hypotheek berekenen? Maak snel een indicatieve berekening van het maximale leenbedrag van uw hypotheek.
August 15th, 2010 at 1:36 am
U wilt geld lenen zonder BKR toetsing? De opties hiervoor worden groter, kijk verder en ontdek hoe u wél geld kunt lenen, snel & eenvoudig.
August 22nd, 2010 at 8:06 pm
tweeter tweetup nasa | google blog | google maps fahrrad
August 25th, 2010 at 1:01 am
It sounds like you’re making difficulties yourself by looking for to solve this trouble instead of searching at why their is a dilemma inside Very first place. thanks !!! very really helpful post!
August 26th, 2010 at 1:09 pm
Great blog 9/10! Bookmarked :)
August 31st, 2010 at 8:02 am
Aw, this is a good piece. In theory I’d like to write this way too – taking skill and serious focus to produce a fantastic article… nevertheless what can I say… I put things off a lot and by no means manage to get things carried out…