surfjoe
asked on
HTML to CSS: Center the page vertically and horizontally instead of (<table height="100%">)
HTML to CSS: Center the page vertically and horizontally instead of (<table height="100%">)
I have tried this solution it works in firefox but not IE
.centered {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 50%;
height: 50%;
margin: auto;
}
I have also tried this solution it works unless the browser window is to small and the top of the page is then cut of losing the navigation not that ideal...
.centered {
width: 932px;
height: 606px;
left: 50%;
top: 50%;
margin-left: -466px;
margin-top: -303px;
position:absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;}
Any ideas?
I have tried this solution it works in firefox but not IE
.centered {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 50%;
height: 50%;
margin: auto;
}
I have also tried this solution it works unless the browser window is to small and the top of the page is then cut of losing the navigation not that ideal...
.centered {
width: 932px;
height: 606px;
left: 50%;
top: 50%;
margin-left: -466px;
margin-top: -303px;
position:absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;}
Any ideas?
try giving,
<table align="center">
Regards -G.
<table align="center">
Regards -G.
you can center a div horizontally by using text-align:center in the style
ASKER
This is what i'm trying to accomplish http://www.resqteknowledgies.com/dev/ee/test2.htm but I need to be able to view the top of the page by scrolling if opened in a small browser window. If you resize the window on this link you will see that it is impossible to view the top of the box. Maybe there is a way to do this with java script?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
left-margin: auto;
right-margin: auto;
top-margin: 0px;
top-padding: 0px;