This is the site I'm building: compagniaoltreconfine.com / beta
As you can see its height is low. I'd like to have all the main div (#page) at the middle of the screen. Left, top, right, bottom should have the same distance from the borders of the content..
I tried with what I thought was the way to do that, i.e. position:absolute for #page and then top:50% and left:50% but... strangely it goes out of the screen.. tried with position:fixed too.. not good.. why it's not working?
The best thing would be to have #page in the middle of the screen if the whole content is displayed within the screen (without any scrolling). If its height is bigger than the screen it be would automatically set to the top of the screen (so without blank space at the top).. for example in this page on some screens has a height bigger than the screen: compagniaoltreconfine.com/beta/chi-siamo/
Don't know if I managed to explain me... :P
As you can see its height is low. I'd like to have all the main div (#page) at the middle of the screen. Left, top, right, bottom should have the same distance from the borders of the content..
I tried with what I thought was the way to do that, i.e. position:absolute for #page and then top:50% and left:50% but... strangely it goes out of the screen.. tried with position:fixed too.. not good.. why it's not working?
The best thing would be to have #page in the middle of the screen if the whole content is displayed within the screen (without any scrolling). If its height is bigger than the screen it be would automatically set to the top of the screen (so without blank space at the top).. for example in this page on some screens has a height bigger than the screen: compagniaoltreconfine.com/beta/chi-siamo/
Don't know if I managed to explain me... :P





