Jump to content

Another question about vertical alignment


challenger

Recommended Posts

Hi,I was wondering if anybody could help me with this question. I searched alot for alignment in XHTML and CSS but didn't find what I need.This is what I want to do with CSS:http://img124.imageshack.us/img124/6856/blockmw2.jpgblockmw2.jpgThe block has a fixed width and height and just needs to be centered in the page. Can anybody tell me how to do this? Most examples are just about 100% height tables. (Or don't work in IE AND FireFox)

Link to comment
Share on other sites

If the height of the yellow box is fixed, you might try CSS positioning:

<style type="text/css">#outerdiv{ height: 600px; position: relative; }#innerdiv{ height: 300px; position: absolute; top: 150px; margin: auto;}</style>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...