newwebcoder
08-06-2011, 07:42 PM
I am a long time programmer but fairly new to web programming.
I am organizing a web page using divs and css. I am trying to keep the content of a div (placed on the right side of the body) to stay within the bordered body. I would rather not hard code the size of the div, but let the contents of the div fill to the right and down to the body borders.
body {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
border-width:1px;
border-style: solid;
}
However, all my attempts have the contents of my div go outside the borders of the body on the right and the bottom.
Any help is appreciated.
I am organizing a web page using divs and css. I am trying to keep the content of a div (placed on the right side of the body) to stay within the bordered body. I would rather not hard code the size of the div, but let the contents of the div fill to the right and down to the body borders.
body {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
border-width:1px;
border-style: solid;
}
However, all my attempts have the contents of my div go outside the borders of the body on the right and the bottom.
Any help is appreciated.