SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I create a fixed width centered two column layout

    How do I create a fixed width centered two column layout
    Last edited by Paul O'B; Jul 13, 2005 at 12:26.

  2. #2
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    ? write the html ? , basic 2 colum layout

    Code:
    <!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" xml:lang="en" lang="en">
    <head>
    	<title>12345 12345 12345 12345 12345 </title>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<style type="text/css">
    	html,body{/*html for FF Moz NS7 OP */
    	text-align:center; /*IE 5 IE 5.5*/
    	margin:0px;/* no margins body */
    	padding:0px;/* no padding body */
    	height:100%;
    	width:100%;
    	}
    	body{font-size:1em;}
    	
    	.con{margin:0 auto 0 auto;padding:0;width:754px}/* main container */
    	
    	/* general */
    	div,p,span,b,a{
    	font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
    	font-size:.9em;
    	color:#000000;
    	margin:0px;
    	padding:0px;
    	text-align:left;/* to get text back to the left*/
    	}
    	
    	.lcol{
    	float:left;
    	width:50%;
    	background:#ccffcc;
    	}
    	.rcol{
    	float:right;
    	width:50%;
    	background:#ffffcc;
    	}
    	
    	.work{
    	float:left;
    	border:1px solid #0000ff;
    	margin:1em 0em 1em 1em;
    	display:inline;
    	}
    	
    	.workx{
    	float:right;
    	border:1px solid #0000ff;
    	margin:1em 1em 1em 0em;
    	display:inline;
    	}
    	
    	.fcl{clear:both;height:1px;overflow:hidden;/*margin-top:-1px;*/}
    	
    	</style>
    </head>
    
    <body>
    <div class="con">
    <div class="lcol">
    <div class="work">12345<br /><br /><br /><br /><br /><br /></div>
    <div class="workx">12345<br /><br /><br /><br /><br /><br /></div>
    <div class="fcl"></div>
    </div>
    
    <div class="rcol">
    <div class="work">12345<br /><br /><br /><br /><br /><br /></div>
    <div class="workx">12345<br /><br /><br /><br /><br /><br /></div>
    <div class="fcl"></div>
    </div>
    <div class="fcl"></div>
    </div>
    </body>
    </html>
    Last edited by all4nerds; Jul 14, 2005 at 03:17.

  3. #3
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •