OZONE Asylum
Forums
Stupid Basic HTML
Centering Opening Logo
This page's ID:
9537
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Here's how I do it. Put your image inside a div called "content". Using a div that we need to be 751x425, we use: <style type="text/css"> #content { position:absolute; text-align: center; border: 0px solid #000000; left: 50%; top: 50%; width: 751px; /* total width of the object */ height: 425px; /* total height of the object */ margin-left: -375px; /* width/2 */ margin-top: -212px; /* height/2 */ } /* The right value for Mozilla (right now these are the same as the IE values. I'll correct it later. This method takes advantage of the CSS bug. */ body>#content { margin-left: -375px; margin-top: -212px; } </style> This actually takes advantage of an IE bug to help Mozilla based stuff be set accordingly. This works great, and maintains center even when resized. [url=http://www.gurusnetwork.com] [img]http://www.ozoneasylum.com/images/88x31/gurusnetwork.gif[/img] [/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »