Jump to content

Recommended Posts

i cant seem to layout my page properly

im tryin to position 2 divs, one left and the other float right

within a div

heres a screenshot of wat i want

ive been playin ard with positionings and floats and even use para instead of divs but no luck so far

anyone can help me quick?

cheers

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/217288-divs-withn-a-div-positioning/
Share on other sites

:wtf: ...just for the records!

They seem to lack a few information for old browser versions.

 

Have fun to crop them out of here (look into sourcecode and commented area):

http://de.selfhtml.org/css/layouts/anzeige/kopfundfuss.htm

 

ps: Yes, it is in german, but I hope that is a minor problem nowadays.

 

Regards,

 

MPeter

Depends how old you are talking. I've used some of the layouts on there, and they work fine IE6 and up, which are the only ones that really matter for the most part.

It was more a personell thing here, you know. My neighbours wife had an old computer, sadly she passed away two years ago by cancer, and she was using Windows for Workgroups 3.11 on a very old machine. I felt writing anything for her, too, the fact we had very good contact over the fence ... ;)

 

But let me crop and translate a part out of the above document:

height: 1em;  /* Workaround gegen den 3-Pixel-Bug des Internet Explorer bis Version 6 */

 

It says that there is Three-Pixel-Bug below Version 6 on the IE, and that line solves it.

 

Regards,

 

MPeter

a quick mockup

 

index.html

 

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div id="wrapper">
<div id="header">Header</div>
<div id="contentWrapper">
	<div id="left">Left</div>
	<div id="right">Right</div>
</div>
</div>

</body>
</html>

 

style.css

 

body{
margin:0;
}

#wrapper{
position:relative;
width:800px;
margin: 0 auto 0 auto;
}

#header{
height:150px;
border:#000000 1px solid;
margin-bottom:10px;
}

#contentWrapper{
border:#000000 1px solid;
height:512px;
}

#left{
margin: 5px 5px 5px 5px;
float:left;
width:570px;
height:500px;
border:#000000 1px solid;
}

#right{
margin: 5px 5px 5px 5px;
float:right;
width:200px;
height:500px;
border:#000000 1px solid;
}

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.