473,387 Members | 1,516 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,387 software developers and data experts.

display of floats in IE6

Dear all,

I am a novice in css programming and was happy to get a layout
involving floats going in Firefox 1.5. Yet when I displayed the page in
IE6 the layout went all pear-shaped! Below is the minimal code. Any
advice on how the page may be displayed correctly in both browsers is
greatly appreciated. Many thanks!

Regards,
Michael
<!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" lang="en" xml:lang="en">

<head>
<style>
body
{
margin: 0px;
padding: 0px;
}
div#header
{
clear: both;
margin: 2% 5% 0%;
border: 1px black solid;
}
/* right border of left float, including margin, after 27% of page
width */
div#left
{
float: left;
width: 20%;
margin: 2% 0% 0% 5%;
border: 1px solid black;
}
/* left border of right float, including margin, after 27% of page
width, coming from the right */
div#right
{
float: right;
width: 20%;
margin: 2% 5% 0% 0%;
border: 1px solid black;
}
/* width of middle float must hence be 100% - 2* 27% = 46% of page
width */
div#middle
{
width: 46%;
margin: 2% 0% 0% 27%;
border: 1px solid black;
}
h1
{
margin: 0em 0em 0em 0em;
font-family: sans-serif;
padding: 0.6em;
}
h3
{
margin: 1em 0em 0.5em 1em;
font-family: sans-serif;
padding: 0em;
}
</style>
</head>

<body>
<div id="header">
<h1>
title
</h1>
</div>
<div id="left">
<h3>
left menu
</h3>
</div>
<div id="right">
<h3>
right menu
</h3>
</div>
<div id="middle">
<h3>
main body
</h3>
</div>
</body>

Mar 9 '06 #1
0 973

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

Similar topics

23
by: Mat | last post by:
<div id="container"> <div id="main"> <div id="header"> <p class="Address">123 Fake Street, </p> <p class="City">Crazy City, </p> <p class="Province">Ontario </p> <p class="PostalCode">H0H...
8
by: Tom | last post by:
Has anyone ever seen a IComparer for floats the returns magnitude. i.e. instead of returning -1, it would return -5. To let you know HOW different the two numbers are. obviously for int it is a -...
8
by: Madhusudan Singh | last post by:
Is it possible to convert a very long list of strings to a list of floats in a single statement ? I have tried float(x) and float(x) but neither work. I guess I would have to write a loop if...
5
by: Haines Brown | last post by:
A much discussed issue, but I'm unable to get results. Using galeon as browser. I have a div, the bottem border of which is solid and serves as a base line. My aim is to line up next to each...
13
by: yb | last post by:
Hi, Is there a CSS method to clear a float such that it aligns with the left content edge. For example: X X X X X X X X
11
by: totalstranger | last post by:
I have a check box with let's say 20 elements. I would like to have it align as 4 columns, 5 rows. Without using a table and using understandable CSS is there any way to make the check boxes align...
17
by: seajay | last post by:
Hello, I noticed something strange when I was composing a XHTML document with CSS The following DOCTYPE causes the page to display differently on Fireflox 1.0.6 and Internet Explorer 6...
16
by: luca bertini | last post by:
Hi, i have strings which look like money values (ie 34.45) is there a way to convert them into float variables? everytime i try I get this error: "numb = float(my_line) ValueError: empty string...
5
by: Keflavich | last post by:
Hey, I have a bit of code that died on a domain error when doing an arcsin, and apparently it's because floating point subtraction is having problems. I know about the impossibility of storing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.