Having a few problems with div's.

Joined
9 May 2005
Posts
2,511
I am a real novice when it comes to html and am just trying to set up a basic 5 div single page for part of a web site I am experimenting with. I have placed the divs where I want them to be and all is great at resolutions above 1024x768.

If I try running any resolutions lower than 1024x768 or if I make a window smaller then it cuts off part of the left side of the screen and then has extra space to the far right of the page.

I am not sure if this is to do with relative/absolute on the divs? At present I have it as Microsoft Expression suggested with the container div being relative and the left and right columns and page content div being absolute, is this right?
 
Last edited:
This is the code I am using for the div's, now that I look at it I think the div closing tags are in the wrong place?

<div class="DivGen">

<div id="masthead" style="width: 970px;
text-align: center;
color: red;
font-size: 30pt;
font-family: Calibri;
font-style: italic;
font-weight: 700;">
</div>

<div id="top_nav" style="width: 970px;
height: 30px;">
</div>

<div id="container" style="width: 970px;
position: relative;
left: 0px;
top: 0px;
height: 1270px;">

<div id="left_col" style="width: 170px;
position: absolute;
left: 0px;
top: 0px;
height: 1270px;
font-size: 14pt;
font-family: Calibri;
font-weight: 700;
color: yellow;
text-align: center;">
</div>

<div id="page_content" style="width: 570px;
position: absolute;
left: 200px;
right: 200px;
top: 0px;
height: 1270px;
font-size: 14pt;
font-family: Calibri;
font-weight: 700;
color: red;
text-align: left;">

<div id="right_col" style="width: 170px;
position: absolute;
right: 0px;
top: 0px;
height: 1270px;
font-size: 14pt;
font-family: Calibri;
font-weight: 700;
color: yellow;
text-align: left;">
</div>
</div>
</div>
 
Back
Top Bottom