2 replies [Last post]
briguy
Offline
newbie
Last seen: 16 years 45 weeks ago
Joined: 2005-01-21
Posts: 2
Points: 0

I have looked around and tried out the css creator on this site plus some others found on the web.

Is it possible, or how, can I create a css layout with 2 static right columns and 1 left fluid column while still maintaining a 10px margin to bound the page on left and right sides. 2 static columns each 199px wide. Can this be done reliably across browsers.

The layout generators or css examples I have found only do left, center, right. Centre is fluid left and right static. I was trying to make a basic page with header, footer and columns as suggested. Can't seem to get it right.

I've spent a few hours playing with the divs problem is i don't fully understand.

Please help.

Thank you.
briguy

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 7 years 40 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

2 right, 1 left

Here's a quickie. It can be modified so that the floating divs appear to full page length (using background on the content div). There are other ways to accomplish this as well. Others may have better or different ideas.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" />
<meta http-equiv="imagetoolbar" content="no" /> <!-- turn off the image toolbar in IE -->

<title>3 div layout</title>
<style type="text/css">
	body {
		margin: 10px;
		}
	#right, #rightmost {
		width: 179px;
		float: right;
		background-color: #ddd;
		padding: 10px;
		}
	#content {
		margin: 0 400px 0 0;
		}
	#right {
		background-color: #ccc;
		}	
	</style>
</head>
<body>
<div id="rightmost">
<p>The right most division</p>
</div>

<div id="right">
<p>this div should be in the middle with a fixed width of 199 pixels</p>
</div>

<div id="content">
<p>Restat succincte de blasfemia pertractandum. Est autem blasfemia insipiens detraccio honoris domini. Et dicitur a blas (quod est insipiens) et femina, que quasi rane blaterant, communiter nimis stulte.</p>
<p>Committitur autem blasfemia tribus modis.  Primo modo, quando deo attribuitur quod sibi non convenit; ut ponendo quod deus nimis severe puniat, vel quod sit iniquitas aput deum.  Secundo modo, cum removetur a deo quod sibi convenit; ut legitur de Rapsace 4to Reg. 18 et 19. Et tercio modo, quando pure creature attribuitur quod deo proprium est. Et ad istum. sensum Judei sepe inposuerunt Cristo blasfemiam, ut patet Matth. 9, 16 et Joh. 10. Et isto modo Herodes, Act. 12 legitur blasfemasse; et principes populi sunt proni incidere in istam blasfemiam.</p>
<p>Et patet scrutanti intime quod, sicut simonia et apostasia conse*beep*ur ad quodcunque mortale, sic et blasfemia, que convertibilis est cum illis. Nam, eo ipso quo quis peccat mortaliter, wult vitam istam esse bonam, et per consequens non reprobatam, sed approbatam a deo: quod est manifesta blasfemia. Wult enim implicite attribuere deo auctorisacionem peccati, quod propter</p>
</div>

</body>
</html>

briguy
Offline
newbie
Last seen: 16 years 45 weeks ago
Joined: 2005-01-21
Posts: 2
Points: 0

2 right, 1 left

Thank you!