View Single Post
Old 06-12-2009, 02:36 PM   #2 (permalink)
wmorri
Moderator/Fedora Amb.
 
wmorri's Avatar
 
Join Date: May 2008
Location: /pm/etc
Posts: 2,832
OS: Window 7/Fedora 10

My System

Send a message via AIM to wmorri
Re: Positioning DIVs (Help plz....)

Hi,

Here are a couple of things that I see wrong with your html, and your css. Have a look at mine, I changed a couple of things. I think that this is more what you want.

HTML Code:
<html>
<head>
<title>Elastic Layout</title>
<link rel="stylesheet" type="text/css" href="elastic.css" />
</head>

<body>
	<div id="wrapper">
		<div id="div1">
		<p>This is div1</p>
		<image src="InstallBackground.jpg" />
		</div>
		
		<div id="div2">
		<p>This is div2</p>
		<image src="InstallBackground.jpg" />
		</div>	
		
		<div id="div3">
		<p>This is div3</p>
		<image src="InstallBackground.jpg" />
		</div>		
</div>
</body>
</html>
HTML Code:
/* Elastic Layout */

body{
margin:0;
padding:0;
}

#wrapper{
margin:0 auto;
max-width:60em;
border:1px dotted blue;
height:20em;
}

#div1 **
float:left;
width:30.1%;
margin:0 1.6% 0 1.6%;
}

#div2 **
float:right;
width:30.1%;
margin:0 1.6% 0 1.6%;
}

#div3 **
float:left;
width:30.1%;
margin:0 1.6% 0 1.6%;
}
Cheers!
__________________


Linux Forever!

wmorri is offline   Reply With Quote