-
Align in direct middle of the page
Is there a way to align a division exactly in the middle of the page horizontally and vertically?
-
I build for: Firefox and tweak for IE
-
Use absolute positioning (top:50%;left:50%). Then give the container negative margins equal to half the size of the container width and height
example:
#middle {
width:400px;
height:50px;
position:absolute;
top:50%;
left:50%;
margin:-25px -200px;
text-align:center;
}
-
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks