AusQB
New Member
I imagined this being as simple as setting a single <div> under <body> at height:100%. Guess not.
Through a few tutorials, I have this code in my CSS:
The problem is that I want this div to be centered.
EDIT: Sorry guys, once again I find the solution not five minutes after posting.
The changes I needed to make to the CSS are highlighted in red:
SECOND EDIT: OK, so that "fix" wasn't as successful as I thought. Now it seems everything is docked with the bottom of the screen.
I made a table with three rows, put some content in middle row, and the top row extends to the bottom leaving enough space for the content.
Through a few tutorials, I have this code in my CSS:
Code:
body {
background: #FFFFFF;
height: 100%;
text-align: center;
}
div#container {
display: block;
height: 100%;
margin: 0 auto;
min-height: 500px;
position: absolute;
top: 0px;
width: 840px;
}
The problem is that I want this div to be centered.
EDIT: Sorry guys, once again I find the solution not five minutes after posting.
The changes I needed to make to the CSS are highlighted in red:
Code:
body {
background: #FFFFFF;
height: 100%;
[COLOR="Red"]position: absolute;[/COLOR]
text-align: center;
[COLOR="Red"]width: 100%;[/COLOR]
}
div#container {
display: block;
height: 100%;
margin: 0 auto;
min-height: 500px; (unnecessary, obviously)
position: absolute; [COLOR="Red"](unnecessary)[/COLOR]
top: 0px; [COLOR="Red"](unnecessary)[/COLOR]
width: 840px;
}
SECOND EDIT: OK, so that "fix" wasn't as successful as I thought. Now it seems everything is docked with the bottom of the screen.
I made a table with three rows, put some content in middle row, and the top row extends to the bottom leaving enough space for the content.
Last edited: