473,320 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

Hi,

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
problems?

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.

Thanks,
Luke.

<?php
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"
"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>Test</title>

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

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

<body>
<div id="container">
<div id="header">
Header
</div>

<div id="menu">
<div class="menuitem">
Home
</div>
<div class="menuitem">
Ada
</div>
<div class="menuitem">
C++
</div>
</div>

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

<div id="adverts">
Adverts area
</div>
</div>

<div id="footer">
Footer
</div>
</div>
</body>
</html>

@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 2725

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Amy | last post by:
Hello all, Well, I've decided to take the plunge and go for this no table theory... so far I'm not impressed - the whole thing is driving me mad!!!! I'm sure once I finally get it working...
28
by: Anthony Williams | last post by:
Good morning, I'm currently designing a site, using CSS, and wish to create a variable width two-column layout, with header and footer, and one fixed-width column on the left. Previously, I...
47
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
30
by: Diane Wilson | last post by:
I'm trying (once again) to figure out how to make a robust CSS layout style that can replace tables. I'd like to be able to do a basic two-column layout, with a one-column header, a two column...
3
by: Andy Lim | last post by:
I'm currently working on my second web application using VS 2003/VB.NET, after moved from Dreamweaver MX. one thing that i missed so much in VS2003 is DWMX's great visual, WYSIWYG layout design,...
4
by: greg.mckone | last post by:
Hi folks, I've been using CSS for style for several years now, but I've never attempted a layout using CSS. (I'd like to move away from tables) I'm working on a page here:...
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
3
by: Daniel | last post by:
Hey guys, I last made a site using Asp.net in vis studio 2003. Now in 2005 and .net 2 i want to make anothe rbut i cant get the layour working. Before i used to make eveyrhting position...
53
by: brave1979 | last post by:
Please check out my javascript library that allows you to create any layout for your web page, nested as deep as you like, adjusting to width and height of a browser window. You just describe it in...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.