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

Floats and overlaps

With this page,

<HTML>
<HEAD><TITLE>Test page</TITLE></HEAD>
<BODY STYLE="color: black; background: white">
<TABLE STYLE="float: left; clear: both"><TR>
<TD STYLE="background: blue; width: 500px; height: 500px">Foo</TD>
</TR></TABLE>
<TABLE STYLE="float: right; clear: both"><TR>
<TD STYLE="background: green; width: 500px; height: 500px">Bar</TD>
</TR></TABLE>
<TABLE><TR>
<TD STYLE="background: red; width: 500px; height: 800px">Baz</TD>
</TR></TABLE>
</BODY>
</HTML>

on browsers I play with, sometimes the clear: both isn't respected in
IE, and sometimes the red and the green blocks overlap in Firefox.
Should I be expecting that, at the least, the browser should find a
way to not have any of these blocks overlap?

(Thanks for help with my previous question, by the way. (-:)

-- Mark
Jul 21 '05 #1
1 1777
try this (see below) , its tested in ie6 and firefox 1.5? (i think that
the version) on windows using xp.

its pretty dirty, if anyone got any ideas in making it tidy, please let
us know.
i kepted getting overlaps in firefox when i just used float:left in,
and blow was the only way without using positioning values.

good luck,

cheers
Lee
<html>
<head>
<title>div instead of tables</title>
</head>
<body>

<div style="background:blue; width:300px; height:200px; float:left;
"><p style="padding:10px;">blue</p></div>
<div style="background:green; width:100px; height:200px;
dispaly:inline; margin-left:307px;"><p
style="padding:10px;">green</p></div>
<div style="background:red; width:300px; height:100px;
margin-top:10px;"><p style="padding:10px;">red</p></div>
</body></html>

Jul 21 '05 #2

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

Similar topics

0
by: Jochen Eisinger | last post by:
Hi, I'm trying to arange the following layout with css (see http://c0ffee.org/test/index.html & /test/style.css): On the one hand, I have a (red) main div and a (green) "float: left;" menu....
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 -...
9
by: Daz | last post by:
Hello hello! I'm trying to finish off putting my design into HTML and I've come across a problem that I can't get my head around. I've got divs floating in two columns, but I'm having problems...
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...
7
by: Daniel Kabs | last post by:
Hi there, for a long time I've been using tables to layout elements on a web page. Example: Say we have a 2x2 table and I'd like to put text (left aligned) and buttons (right aligned) in the...
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
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...
6
by: Hendrik Maryns | last post by:
Hi, There is a little problem with the header on the page I recently converted from frames to proper HTML+CSS. The top part with the navigation used to be the top frame but is now included via...
0
by: Matthieu Brucher | last post by:
2008/11/5 L V <somelauw@yahoo.com>: Hi, I don't think the Python developers list is th best list to post this kind of question. What version of Python did you use for this test? Matthieu
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.