Jump to content

CSS Layout Help


coast917

Recommended Posts

I'm trying to convert a site from a table layout to a (hopefully) all-CSS layout.

 

Everything is going great up until I reached my current state.

 

This is where it is currently at:

beforege6.jpg

 

This is where I want it to end up:

afterck6.jpg

 

As you can see, I need the main content area, which will always be the longest, to force it's size on the left & right content areas.  The left isn't quite so important since it shares it's background with the rest of the page.  The right side does not though an must stay the same as the center area.

 

The second thing is that I will need two background images that run the length of the main content are (one on the left, and one on the right).  This is show in the "after" picture.

 

I can't seem to get anything that works.  Here is the HTML and CSS code for the "before" layout.

 

<html>
<head>
<title>Title</title>
<link rel=StyleSheet href="layout.css" type="text/css" />
<body>
<div id="container">
<div id="leftColumn">
	<?= $leftContent ;?>
</div>
<div id="mastHead">
	<?= $mastHead; ?>
</div>
<div id="rightColumn">
	<?= $rightContent; ?>
</div>
<div id="content">
	<?= $content; ?>
</div>
<div id="footer">
	<?= $footer; ?>
</div>
</div>
</body>
</html>

 

body {
margin: 0px;
padding: 0px;
fo[i]nt-family: verdana, geneva, arial, helvetica, 'sans-serif';
font-size: 10px;
font-weight: normal;
line-height: 13px;
text-decoration: none;
background: #d5d5b2;
}

#container {
min-width: 800px;
}

#leftColumn {
width: 170px;
float: left;
}

#mastHead {
/*background-image: url("/graphics/mastheads/secmastheadback.gif");*/
margin-left: 170px;
}

#content {
min-width: 550px;
margin-left: 170px;
padding: 0px;
background-color: #fff;
margin-right: 185px;
}



#rightColumn {
width: 152px;
float: right;
background-color: #0f0;
padding: 10px;
background-color: #d6c79f;
margin-right: 12px;
}
[/i]
#footer {
width: 100%;
text-align: center;
}

 

Any ideas?  Thanks!

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.