469,945 Members | 2,270 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

Decent layout not working in IE6 - is there a way to fix it?


I've created a layout for an Ajax side that is "single paged" in that
when the browser is resized, so is the page. The header is locked to
the top, the right panel is locked to the right side and the footer is
locked to the bottom leaving the main content area as a scrollable
resiable area in the centre of the window. This works as expected in
FF, Opera, IE7, but not in IE6.

the problem with IE6 is that positioning using left and right and/or
top and bottom doesn't work. You can use left with top/bottom and
right with top/bottom, which is crap.

A working version can be viewed here: http://codedump.archangeli.co.uk.
BTW, It's a PHP page which handles the XHTML stuff in the header.

Now, is there a way to force IE6 to handle this correctly? Possibly by
using JavaScript to set the width and height of the divs when the
browser window changes? This I don't mind as long as I can still have
the divs where I want and any effects on them doesn't cause any

I've searched for the entire day looking for answers only to find
nothing, so this is my last hope. I've posted the source below for
people to peruse.


if ((stristr($_SERVER['HTTP_ACCEPT'],"application/xhtml+xml"))||
(stristr($_SERVER['HTTP_USER_AGENT'],"Validator"))) {
header("Content-type: application/xhtml+xml");
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
else {
header("Content-type: text/html");
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<link rel="stylesheet" type="text/css" href="styles.css"/>

<script src="scripts/js/mootools.v1.00.js" type="text/javascript"/
<script type="text/javascript">

<div id="container">
<div id="header">

<div id="menu">
<div class="menuitem">
<div class="menuitem">
<div class="menuitem">

<div id="columns">
<div id="client">
Client area

<div id="adverts">
Adverts area

<div id="footer">

@charset "UTF-8";

body {
font-family: Arial, Verdana, sans-serif;
font-size: 12px;
font-weight: normal;
margin: 0px;

color: #ffffff;

#container {
position: absolute;
top: 10px;
bottom: 10px;
left: 10px;
right: 10px;

background-color: #ffbb55;

#header {
position: absolute;
width: 100%;
height: 100px;

background-color: #00bb55;

#menu {
position: absolute;
top: 100px;
left: 0px;
right: 0px;
height: 30px;
font-weight: bold;
padding: 2px;

background-color: #550000;

..menuitem {
text-align: center;
float: left;
width: 50px;
/* height: 28px;*/
/* height: 100%;*/
border: 1px solid white;

#columns {
position: absolute;
top: 134px;
bottom: 30px;
left: 0px;
right: 0px;

background-color: #44ff44;

#client {
position: absolute;
top: 0px;
left: 0px;
right: 150px;
bottom: 0px;
height: 100%;
overflow: auto;

background-color: #009944;

#adverts {
position: absolute;
width: 150px;
height: 100%;
right: 0px;
overflow: auto;

background-color: #006699;

#footer {
position: absolute;
bottom: 0px;
width: 100%;
height: 30px;

background-color: #883300;

Feb 9 '07 #1
0 2536

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by Amy | last post: by
28 posts views Thread by Anthony Williams | last post: by
47 posts views Thread by Neal | last post: by
30 posts views Thread by Diane Wilson | last post: by
3 posts views Thread by Andy Lim | last post: by
14 posts views Thread by Anoop | last post: by
3 posts views Thread by Daniel | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.