TagUK2006
09-27-2008, 03:54 PM
Hi Guys,
Im trying to layout a page using CSS rather than the old way I was taught at college using tables many moons ago...
So I have my layout in mind its very simple I want to make a container that resembles a table layout of 1 column and 3 rows..
So I have done this on my main page...
<div class="Mainbox">
<div class="Maintop">
<!--#include virtual="/Templates/TopMain.asp" -->
</div>
<div style="padding-left:30px;">
<p>Any Content Here</p>
</div>
<div class="Mainbottom">
<!--#include virtual="/Templates/BottomMain.asp" -->
</div>
</div>
As you see the top and bottom of this container include external html files that show my header and footer as I want..this seems to be working.
My problem lies in the CSS as I cant seem to get the image for the ceneter of the container to show and repeat properly, It seems to show and cover the whole page until i set the body colour of the page then I have problems..The code I used is below : "background: url(/Templates/MainCenterSlice.jpg) repeat-y; this worked as I say but covered the whole page and not just the section where my content goes.
"
I also want the bottom Div "Mainbottom" in my container to stick to the bottom of the main box container and I cant seem to get it to do this either.
Here is a cut down of my style sheet to show you what im trying..
I also want to set the height of the container as you see Ive commented it out in the code as it wasnt working..
/* My CSS Document */
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
font-size: 10px;
color: #586BB7;
font-family: tahoma;
text-decoration:none;
min-width: 800px;
text-align: center;
background-color:#FFFFFF;
/* Main Box 1 */
.Mainbox {
width: 800px;
/* height:800px; */
padding: 0 0px;
background: url(/Templates/MainCenterSlice.jpg) repeat-y;
margin:0 auto;
text-align: left;
}
.Mainbox .Maintop {
height: 171px;
margin: 0 -0px;
}
.Mainbox .Mainbottom {
height: 183px;
margin: 0 -0px;
}
Thoughts are very welcome as Id like to do this with CSS instead of my old tables..
Kind Regards
Tag
Im trying to layout a page using CSS rather than the old way I was taught at college using tables many moons ago...
So I have my layout in mind its very simple I want to make a container that resembles a table layout of 1 column and 3 rows..
So I have done this on my main page...
<div class="Mainbox">
<div class="Maintop">
<!--#include virtual="/Templates/TopMain.asp" -->
</div>
<div style="padding-left:30px;">
<p>Any Content Here</p>
</div>
<div class="Mainbottom">
<!--#include virtual="/Templates/BottomMain.asp" -->
</div>
</div>
As you see the top and bottom of this container include external html files that show my header and footer as I want..this seems to be working.
My problem lies in the CSS as I cant seem to get the image for the ceneter of the container to show and repeat properly, It seems to show and cover the whole page until i set the body colour of the page then I have problems..The code I used is below : "background: url(/Templates/MainCenterSlice.jpg) repeat-y; this worked as I say but covered the whole page and not just the section where my content goes.
"
I also want the bottom Div "Mainbottom" in my container to stick to the bottom of the main box container and I cant seem to get it to do this either.
Here is a cut down of my style sheet to show you what im trying..
I also want to set the height of the container as you see Ive commented it out in the code as it wasnt working..
/* My CSS Document */
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
font-size: 10px;
color: #586BB7;
font-family: tahoma;
text-decoration:none;
min-width: 800px;
text-align: center;
background-color:#FFFFFF;
/* Main Box 1 */
.Mainbox {
width: 800px;
/* height:800px; */
padding: 0 0px;
background: url(/Templates/MainCenterSlice.jpg) repeat-y;
margin:0 auto;
text-align: left;
}
.Mainbox .Maintop {
height: 171px;
margin: 0 -0px;
}
.Mainbox .Mainbottom {
height: 183px;
margin: 0 -0px;
}
Thoughts are very welcome as Id like to do this with CSS instead of my old tables..
Kind Regards
Tag