Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jun 2004
    Posts
    7
    Member #
    6348
    Trying to get a layout that is all CSS, but I can't for some reason. I broke it down to the basic code, please tell me whet I'm doing wrong. I've tried this a few ways, going as far as having a bunch of hacks for different browsers, etc, but after beating my head against the wall for 4 hours, I've started over, so here's the layout in it's simplest form.

    This is a fixed-width 2-column layout. I'm getting different results in firefox 1 and IE 6, both wrong.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<style type="text/css">	<!--
    	body{
    		background-color: #e0d7cc;
    		font-family: Arial, Helvetica, sans-serif;
    		margin:0;
    		padding:0;
    		min-width:780px;
    	}
    	#wrapper{
    		width: 780px;
    		position: absolute;
    		left: 50%;
    		margin-left: -390px;
    	}
    	#top{
    		width: 780px;
    		background-color: #FFDAB9;
    	}
    	#header {
    		float: left;
    		width: 592px;
    		height: 175px;
    		background-color: Olive;
    	}
    	#menu {
    		float: left;
    		width: 188px;
    		height: 175px;
    		background-color: #D2B48C;
    	}
    	#main {
    		float: left;
    		width: 592px;
    		background-color: Silver;
    	}
    	#sidebar {
    		float:left;
    		width:188px;
    		margin-left:592px;
    		background-color: #f23456;
    	}
    	#footer{
    		width: 780px;
    		background-color: #AFEEEE;
    		clear: both;
    	}
    	-->
    </style>
      </head>
      
      <body>
        <div id="wrapper">
    		<div id="top">top</div>
    		<div id="header">header</div>
    		<div id="menu"><p>menu</p></div>
    		<div id="main"><p>main body<br /> main body <br /> main body</p></div>
    		<div id="sidebar"><p>Sidebar</p></div>
    		<div id="footer"><p>Footer</p></div>
        </div>
      </body>
    </html>

  2.  

  3. #2
    Senior Member
    Join Date
    Jul 2005
    Location
    S.Wales, UK
    Posts
    250
    Member #
    10742
    This is a good css layout generator to learn about it or to generate one when you are in a hurry:

    http://www.csscreator.com/version2/pagelayout.php
    Paul Creedy
    Visit my community site at: www.rhonddacynontaff.com
    My hosting: www.rcthosting.com
    My Content Management product: www.dynamiccontenteditor.com


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:51 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com