I'm struggling with page layout. This is a link to the website in its current state www.gemmabayliss.co.uk. I am hoping to have a layout which has an image of fixed height size on the left (I've put this is 'sidebar') and then descriptive text on the right (I've put this in content). I would like the text to sit at the bottom right of the screen always ending at the same level that the image ends (image is 500px height), so want to find a way to 'fix' the content box so that it can't go any further down the page. This way, hopefully, the text will appear in the same place no matter what browser is being used. Sorry if this doesn't make much sense. I've tried a number of changes to the style sheet but am not having much success. Any ideas?
Here's the code of the layout:
Code: Select all
/*****************
basic layout
*****************/
body {
background-color: #FSF3E5;
color: #FSF3E5;
margin:1em; /* gives some air for the pagewrapper */
}
/* center wrapper, min max width */
div#pagewrapper {
border: 0px solid black;
margin: 0 auto; /* this centers wrapper */
max-width: 70em; /* IE wont understand these, so we will use javascript magick */
min-width: 60em;
background-color: #FSF3E5;
color: black;
}
/*** header ***
we will hide text and replace it with a image
we need to assign a height for it
*/
div#header {
height: 40px; /* adjust according your image size */
background: #FSF3E5;
}
div#header h1 a {
/* you can set your own image here */
background: #FSF3E5 url(images/cms/logo green.jpeg) no-repeat 0 12px;
display: block;
height: 80px; /* adjust according your image size */
text-indent: 0.4em; /* this hides the text */
text-decoration:none; /* old firefox would have shown underline for the link, this explicitly hides it */
}
div#content {
margin: 1.5em auto 2em 0; /* some air above and under menu and content */
max-height: 550px;
}
div#sidebar {
max-height: 520px;
vertical-align: bottom;
text-align: left;
float: left; /* set sidebar on the left side. Change to right to float it right instead. */
width: 65%; /* sidebar width, if you change this please also change #main margins */
display: inline; /* FIX ie doublemargin bug */
margin-left: 0.5%;
<link/www.nakashiawoodworker.com>
}
/* if sidebar doesnt include menu but content add class="hascontent" */
div#sidebar.hascontent {
padding: 0 1%;
width: 29%; /* make width smaller if there's padding, or it will get too wide for the floated divs in IE */
}
div#main {
margin-left: 68%; /* this will give room for sidebar to be on the left side, make sure this space is bigger than sidebar width */
margin-right: 2%; /* and some air on the right */
}
div#footer {
clear:both; /* keep footer below content and menu */
color: #8B4513;
background-color: #FSF3E5; /* same bg color as in header */
}
div#footer p {
font-size: 0.8em;
padding: 1.5em; /* some air for footer */
text-align: right; /* centered text */
margin:0;
}
div#footer p a {
color: #8B4513; /* needed becouse footer link would be same color as background otherwise */
}
/* as we hid all hr for accessibility we create new hr with extra div element */
div.hr {
height: 1px;
margin: 1em;
border-bottom: 1px dotted black;
}
/* relational links under content */
div.left49 {
float: left;
width: 49%; /* 50% for both left and right might lead to rounding error on some browser */
}
div.right49 {
float: right;
width: 49%;
text-align: right;
}


