Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Help with problematic css layout
Old 09-01-2005, 09:59 PM Help with problematic css layout
Novice Talker

Posts: 7
Trades: 0
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>

Last edited by cathode; 09-01-2005 at 10:03 PM..
cathode is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-02-2005, 04:27 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And it is supposed to look like????
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-02-2005, 01:18 PM Try This
Ultra Talker

Posts: 255
Location: NY
Trades: 0
Well, I sure needed the practice, and hope this helps. I checked it in Firefox and it seemed to look ok, as with EI6. If this is not correct, then I'd sure be interested in finding out what I did wrong, too!

test.css file:

body { background-color: #e0d7cc;
font-family: Arial, Helvetica, sans-serif;
margin:0;
padding:0;
min-width:780px;
}

#wrapper {
width: 780px;
position: absolute;
}

#top { width: 780px;
background-color: #FFDAB9;
margin-top: auto;
}

#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;
background-color: #f23456;
}

#footer{ width: 780px;
background-color: #AFEEEE;
clear: both;
}

Then the HTML:

<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="test.css" type="text/css">
<head>
<title></title>


</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</p></div>
<div id="sidebar"><p>Sidebar</p></div>
<div id="footer"><p>Footer</p></div>
</div>
</body>
</html>

Tell me if it worked for you,
DianeD
DianeD is offline
Reply With Quote
View Public Profile Visit DianeD's homepage!
 
Reply     « Reply to Help with problematic css layout
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.57987 seconds with 12 queries