Click to See Complete Forum and Search --> : %@#$%@#$%@ Ie


mwmwnmw
06-19-2007, 01:53 PM
Man I hate microsoft! Ok, this should be so simple. One division containing 3 other divisions. The container division is 798px wide. The left division is 162 wide as is the right. I haven't even inserted the middle yet. The left floats left and the right floats right. When I put them up there in firefox it does exactly as one would expect. In IE??? It displays the left division properly, but drops the right division down below the left before aligning it to the right. The result is that I have stuff on the left, then a whole bunch of blank space, then below that I have more blank space and stuff on the right. Please, anyone, any ideas???

The CSS...


#big
{
margin-top: 6px;
width: 798px;
height: auto;
text-align: left;
}

#leftbox
{
margin-top: 1px;
width: 152px;
height: auto;
margin-left: 5px;
margin-right: 5px;
float: left;
}

#rightbox
{
margin-top: 1px;
width: 152px;
height: auto;
margin-left: 5px;
margin-right: 5px;
float: right;
}

and the html


<div id="big"
<div id="leftbox">
<table width="150" border="1" cellpadding="0" cellspacing="0" >
<tr>
<td width="150" height="150">&nbsp;</td>
</tr>
<tr>
<td width="150" height="150">&nbsp;</td>
</tr>
<tr>
<td width="150" height="150">&nbsp;</td>
</tr>
<tr>
<td width="150" height="150">&nbsp;</td>
</tr>
</table>
</div>
<div id="rightbox">
<table width="150" border="1" cellpadding="0" cellspacing="0" >
<tr>
<td width="150" height="150">&nbsp;</td>
</tr>
<tr>
<td width="150" height="150">&nbsp;</td>
</tr>
<tr>
<td width="150" height="150">&nbsp;</td>
</tr>
<tr>
<td width="150" height="150">&nbsp;</td>
</tr>
</table>
</div>
</div>

WebJoel
06-19-2007, 02:01 PM
Yes, -'trick' the middle content! :) Let the "container" be the middle content with margins-left and margin-right equal to the left-DIV and right-DSIV respectively. You can preserve your floats, which do not interfere.

And I'd go non-table. I loathe TABLE but if you don't know how, -tell ya what. -I'll take to offline for a few and see if I can write-up something with footernotes.

Noted that you stated width is 798 pixels. -This will create a scrollbar on a 800-width resolution, -is that okay with you or would you like a 'fluid center' so that it can 'adjust' to reduced monitor widths? We'd have to keep the left and right DIVS 'fixed width', though.

brb..

mwmwnmw
06-19-2007, 02:08 PM
I def don't want a scrollbar. I'm really going a bit batty with this thing. It's a project I picked up but I'm a programmer and not a designer. When I started to try to pour data into the pages I quickly realized that every page had to be rewritten. There were as many as four <body> tags on some of these pages, everything was in tables, the css was a mess... Anyway, you're saying to just add the content to the middle container, which is fine I think. I would prefer to have the content separate and just bring it in w/ an include, but that shouldn't matter. You make a lot of sense here.

WebJoel
06-19-2007, 02:14 PM
-encountering a bit of diff with project... working... (also, major thunderstorm coming... might have to bail the pc shortly...)

mwmwnmw
06-19-2007, 02:30 PM
curious... the order for calling these would be rightdiv, then leftdiv, and then the middle content, or does that matter?

WebJoel
06-19-2007, 02:54 PM
(-missed 30-min. cut-off, -storm here!!)

I opted to get an existing 3-column layout that resizes.... I said "padding-left" and "padding-right", -opps, -meant to say BORDER and those are the left/right columns. -It 'tricks' IE.

I footnoted this, -hope it helps you.

<!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>3-column fixed left-right with fluid center</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="" />
<meta name="Keywords" content="" />
<meta http-equiv="Content-Language" content="en-us" />
<meta name="robots" content="all"/>
<meta name="authors" content=" "/>
<style type="text/css">
* {margin: 0;padding: 0; border:0;}
body {font-family: "Lucida Grande", Verdana, "Trebuchet MS", sans-serif;
background-color: #E6E6E6; font-size: 16px;}

/* no need to declare "margin:0; padding:0;" again, because " *{foo:bar} " gets them all */
body {min-height:100%; height:101%; margin:10px;
font:x-small Arial, Verdana, sans-serif;
voice-family: "\"}\"";voice-family:inherit;
font-size:small;/*for IE 5.5 */
} html>body {font-size:small;}
/*font-size: small; voice-family: "\"}\"";
voice-family: inherit; font-size: medium;*/} /* Assist IE rendering height, keyword-font sizes, etc. */

/* next sets some basic defaults for header tag sizes and margins (required) */
h1, h2, h3, h4, h5, h6 {font-family: 'times new roman', arial, verdana, serif; background-color:none;
font-style:normal; font-variant:normal; font-weight:normal; }
h1{font-size: 1.86em; margin-top:12px;}
h2{font-size: 1.62em; margin-top:12px;}
h3{font-size: 1.42em; margin-top:12px;}
h4{font-size: 1.39em; margin-top:12px;}
h5{font-size: 1.32em; margin-top:12px;}
h6{font-size: 1.21em; margin-top:12px;}

p {margin: 10px 0;}

#header {background-color:#FFF; border:1px solid tan; border-bottom:none;
text-align:left; height:60px;}
#header h1 {font-weight:bold; text-align:center;}

#left {background-color:transparent; color:#FFFFFF; width:125px; float:left;}
#left ul {margin-left:20px;}
#left ul li {list-style-type:none;}
#right {background-color:transparent;color:#FFFFFF; width:125px; float:right;}
#right ul {margin-right:60px;}

#left h2, #right h2 { background-color:transparent; border-bottom:1px solid #163740; color:#122E36;
height:25px; display:block; font-size:20px; font-weight:normal; line-height:25px; text-align:center;}

#left a, #right a {margin-left:10px;}

#center {background-color:#ececec; color:#000; padding:20px; border-left:160px solid tan;
border-right:160px solid tan;}
/* note that the BORDER-LEFT and BORDER-RIGHT are really the LEFT and RIGHT columns */

#center h1 {text-align:center; padding:20px 0;}

#footer {background-color:white; clear:both; font-size:1.3em; letter-spacing:0.25em; padding:0.3em 0; text-align:center;}
</style>

</head>
<body>

<div id="header"><h1>Your BANNER text here</h1></div>

<div id="left">
<h2> Navigation</h2>
<ul>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<ul>
</div>

<div id="right">
<h2>List, Navigation</h2>
<ul>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<li><a href="#">Link here</a></li>
<ul>
</div>

<div id="center">
<h1>Header Here</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Suspendisse egestas ultricies pede. Phasellus suscipit blandit risus.
Praesent nonummy. In erat. Duis nibh pede, accumsan eu, pulvinar et,
volutpat vel, elit.

<img alt="Image #1" src="#" style="width:100px; height:125px; border:1px soild black; margin:9px; float:left;" />Curabitur nec dui sed nunc congue tempus. Nulla ac
dui ac libero fringilla nonummy. Maecenas ullamcorper sodales risus.
Vivamus pretium dolor. Proin eu turpis. Phasellus ut mauris non nulla
mattis luctus. Nunc porttitor dapibus sapien. In malesuada fermentum
metus. Nulla egestas, tellus a vestibulum pharetra, nunc purus auctor
lacus, ut semper purus ipsum eu velit. Praesent dui. Nulla accumsan
turpis at erat.</p>

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Morbi lacus felis, euismod at, pulvinar sit amet, dapibus eu, eros.
Etiam tellus. Nam vestibulum porttitor urna. Phasellus aliquet pretium
quam. Proin pharetra, wisi nec tristique accumsan, magna sapien pulvinar
purus, vel hendrerit ipsum tellus at ante.</p>

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Suspendisse egestas ultricies pede. Phasellus suscipit blandit risus.
Praesent nonummy.
<img alt="Image #2" src="#" style="width:100px; height:125px; border:1px soild black; margin:9px; float:right;" /> In erat. Duis nibh pede, accumsan eu, pulvinar et,
volutpat vel, elit. Curabitur nec dui sed nunc congue tempus. Nulla ac
dui ac libero fringilla nonummy.
Maecenas ullamcorper sodales risus.
Vivamus pretium dolor. Proin eu turpis. Phasellus ut mauris non nulla
mattis luctus. Nunc porttitor dapibus sapien. In malesuada fermentum
metus. Nulla egestas, tellus a vestibulum pharetra, nunc purus auctor
lacus, ut semper purus ipsum eu velit. Praesent dui. Nulla accumsan
turpis at erat.</p>

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Morbi lacus felis, euismod at, pulvinar sit amet, dapibus eu, eros.
Etiam tellus. Nam vestibulum porttitor urna. Phasellus aliquet pretium
quam. Proin pharetra, wisi nec tristique accumsan, magna sapien pulvinar
purus, vel hendrerit ipsum tellus at ante. Nam vestibulum porttitor urna. Phasellus aliquet pretium
quam. Proin pharetra, wisi nec tristique accumsan, magna sapien pulvinar
purus, vel hendrerit ipsum tellus at ante.</p>
</div>

<div id="footer">Whatever you want to do here, -copyright info, etc</div>

</body>
</html> What makes it work, BOLD. Actual content, blue.
Looks complicated but it mostly is things that makes the page look the same in other browsers, not related to actual functioning of 3-col layout.