davm22
11-07-2010, 03:25 PM
I am new to HTML/CSS and working through different things using it.
1. I would like my layer to be in the center of a web page, with 200 pixels at either side of the layer. If the user alters the size of the browser, I would like it to stay centered to the same ratio as 200px to the 100% browser.
I also want the layer to go all the way to the bottom of the page (height:572px; within my code but I couldnt think of a better way) but I dont know how to make this automatic? So that the layer always goes to the bottom of the page no matter what size of window is open?
Apologies if that doesnt make much sense. Any help is much appreciated. See below for the coding that I am using, some of which isnt essential but Ive been trying everything to make it work :rolleyes:.
#layer1 {
position: absolute;
left: 200px;
right: 200px;
margin-left: auto;
margin-right; auto;
top: 0px;
bottom: 0px;
z-index: 1;
background-color: #ed1c24;
border: 10px solid #ed1c24;
height: 572px;
}
Thanks
1. I would like my layer to be in the center of a web page, with 200 pixels at either side of the layer. If the user alters the size of the browser, I would like it to stay centered to the same ratio as 200px to the 100% browser.
I also want the layer to go all the way to the bottom of the page (height:572px; within my code but I couldnt think of a better way) but I dont know how to make this automatic? So that the layer always goes to the bottom of the page no matter what size of window is open?
Apologies if that doesnt make much sense. Any help is much appreciated. See below for the coding that I am using, some of which isnt essential but Ive been trying everything to make it work :rolleyes:.
#layer1 {
position: absolute;
left: 200px;
right: 200px;
margin-left: auto;
margin-right; auto;
top: 0px;
bottom: 0px;
z-index: 1;
background-color: #ed1c24;
border: 10px solid #ed1c24;
height: 572px;
}
Thanks