473,398 Members | 2,393 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,398 software developers and data experts.

Floating div problem

I have this page that has layout like the following:
(no frameset)
----------------------------------------
| header |
|--------------------------------------|
| div1 | div2 |
| | |
|-------------------| |
| div3 | |
| | |
| |------------------|
| | div4 |
| | |
| | |
| | |
| | |
----------------------------------------

The page has to use all the browser space, without
having scrollbar in the outer page, if possible.

Also, Since I need to hide div2 and div3 in some
situation, I implemented it with 4 floating div.

Everything works fine in IE6. However, in Mozilla
(1.7.3), somehow the div1 and div3 overlapped.
You can see this by loading the source below into
Mozilla. I wonder if this is a bug in the Mozilla?
Also, does anyone has a solution that can be applied
to both IE6 and Mozilla?

Bryan

-------------- Start Source -----------------
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html style="width:100%; height:100%" xml:lang="en" lang="en"
xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Move Test</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=UTF-8" />
<style type="text/css">
.div1N {width:50%;height:20%;float:left;clear:left;}
.div2N {width:50%;height:50%;float:right;clear:right;}
.div3N {width:50%;height:80%;float:left;clear:left;}
.div4N {width:50%;height:50%;float:right;clear:right;}
.div1M {width:100%;height:20%;}
.div2M {float:none;display:none;}
.div3M {float:none;display:none;}
.div4M {width:100%;height:80%;}
</style>
<script language="javascript" type="text/javascript">
function Max_Normal(o)
{
var odiv1 = document.getElementById("div1");
var odiv2 = document.getElementById("div2");
var odiv3 = document.getElementById("div3");
var odiv4 = document.getElementById("div4");
if (odiv1.className == "div1N")
{
o.value ="Normalize";
odiv1.className = "div1M";
odiv2.className = "div2M";
odiv3.className = "div3M";
odiv4.className = "div4M";
}
else
{
o.value ="Maximize";
odiv1.className = "div1N";
odiv2.className = "div2N";
odiv3.className = "div3N";
odiv4.className = "div4N";
}
}
</script>
</head>
<body style="height:100%;width:100%; margin:0px; paddding:0px;
overflow:auto; vertical-align:top;">
<table cellpadding="0" cellspacing="0" style="width:100%; height:100%;">
<tr>
<td>
<input type="button" value="Maximize" onclick="Max_Normal(this)" />
</td>
</tr>
<tr>
<td style="width:100%; height:100%;">
<div id="div1" class="div1N">
<table cellpadding="0" cellspacing="0" style="width:100%; height:100%;">
<tr>
<td>&nbsp;div1</td>
</tr>
<tr>
<td style="width:100%; height:100%; border:1px red solid;">
<iframe id="if1" name="if1" src="select1.html" frameborder="0"
style="width:100%; height:100%;"></iframe>
</td>
</tr>
</table>
</div>
<div id="div2" class="div2N">
<table cellpadding="0" cellspacing="0" style="width:100%; height:100%;">
<tr>
<td>&nbsp;div2</td>
</tr>
<tr>
<td style="width:100%; height:100%; border:1px blue solid;">
<iframe id="if2" name="if2" src="select2.html" frameborder="0"
style="width:100%; height:100%;"></iframe>
</td>
</tr>
</table>
</div>
<div id="div3" class="div3N">
<table cellpadding="0" cellspacing="0" style="width:100%; height:100%;">
<tr>
<td>&nbsp;div3 <span style="background:red">(Div1 & Div3
overlapped in Mozilla)</span></td>
</tr>
<tr>
<td style="width:100%; height:100%; border:1px green solid;">
<iframe id="if3" name="if3" src="select3.html" frameborder="0"
style="width:100%; height:100%;"></iframe>
</td>
</tr>
</table>
</div>
<div id="div4" class="div4N">
<table cellpadding="0" cellspacing="0" style="width:100%; height:100%;">
<tr>
<td>&nbsp;div4<span style="background:green">(Div2 & Div4
OK)</span></td>
</tr>
<tr>
<td style="width:100%; height:100%; border:1px yellow solid;">
<iframe id="if4" name="if4" src="select4.html" frameborder="0"
style="width:100%; height:100%;"></iframe>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
-------------- end Source -----------------
Jul 21 '05 #1
10 4624
In comp.infosystems.www.authoring.stylesheets NoSpan said:
You can see this by loading the source below into
Mozilla.


so instead of supplying a url i can easily click on and then click on
another button to view the source in my editor you want me to:

1. copy source
2. start editor
3. paste in editor
4. save somewhere
5. start browsers
6. find file and open it.

i don't think so.

--
the facts and opinions expressed by brucies
l i t t l e v o i c e s
are not necessarily the same as those held by brucie.
Jul 21 '05 #2
On Tue, 02 Nov 2004 15:53:13 -0800, NoSpan <No****@hotmail.com> wrote:
I have this page that has layout like the following:
(no frameset)


This requires a URL for any effective help.
Jul 21 '05 #3
On Wed, 3 Nov 2004 10:24:02 +1000, brucie <sh**@usenetshit.info>
wrote:
In comp.infosystems.www.authoring.stylesheets NoSpan said:
You can see this by loading the source below into
Mozilla.


so instead of supplying a url i can easily click on and then click on
another button to view the source in my editor you want me to:

1. copy source
2. start editor
3. paste in editor
4. save somewhere
5. start browsers
6. find file and open it.

i don't think so.


Well if you could take six years just to type that and be bitchy.....

BB
www.kruse.co.uk
The home of SEO that's shiny!
Jul 21 '05 #4
In comp.infosystems.www.authoring.stylesheets Big Bill said:
Well if you could take six years just to type that and be bitchy.....


shouldn't you be obsessing over search engines somewhere?
--
the facts and opinions expressed by brucies
l i t t l e v o i c e s
are not necessarily the same as those held by brucie.
Jul 21 '05 #5
Neal wrote:
On Tue, 02 Nov 2004 15:53:13 -0800, NoSpan <No****@hotmail.com> wrote:
I have this page that has layout like the following:
(no frameset)

This requires a URL for any effective help.

Since 2 people suggest I use an URL, I will try to find a free web space
and come back again.

Bryan
Jul 21 '05 #6
On Wed, 03 Nov 2004 06:29:36 GMT, Big Bill <kr***@cityscape.co.uk> wrote:
Well if you could take six years just to type that and be bitchy.....


brucie doesn't type. He uses a pointy stick interface.
Jul 21 '05 #7
On Wed, 3 Nov 2004 21:21:52 +1000, brucie <sh**@usenetshit.info>
wrote:
In comp.infosystems.www.authoring.stylesheets Big Bill said:
Well if you could take six years just to type that and be bitchy.....


shouldn't you be obsessing over search engines somewhere?


Everyone needs a holiday.

BB (except you, before you say it).
www.kruse.co.uk
The home of SEO that's shiny!
Jul 21 '05 #8
OK. The site is now up in the URL

http://test543.htmlplanet.com/Move/move3.html

Hope this is worth it 8-).

Bryan
----- Original Problem Description -----
I have this page that has layout like the following:
(no frameset)
----------------------------------------
| header |
|--------------------------------------|
| div1 | div2 |
| | |
|-------------------| |
| div3 | |
| | |
| |------------------|
| | div4 |
| | |
| | |
| | |
| | |
----------------------------------------

The page has to use all the browser space, without
having scrollbar in the outer page, if possible.

Also, Since I need to hide div2 and div3 in some
situation, I implemented it with 4 floating div.

Everything works fine in IE6. However, in Mozilla
(1.7.3), somehow the div1 and div3 overlapped.
You can see this by loading the source below into
Mozilla. I wonder if this is a bug in the Mozilla?
Also, does anyone has a solution that can be applied
to both IE6 and Mozilla?

Bryan
Jul 21 '05 #9
Mozilla is usually more standard compliant than IE6 - I tried
validating your page using http://validator.w3.org/ and it contains
html errors, you should probably fix those before trying to solve the
problem.

Rob
Everything works fine in IE6. However, in Mozilla
(1.7.3), somehow the div1 and div3 overlapped.
You can see this by loading the source below into
Mozilla. I wonder if this is a bug in the Mozilla?
Also, does anyone has a solution that can be applied
to both IE6 and Mozilla?

Bryan


Jul 21 '05 #10
ne**@robdavis.plus.com wrote:

It's updated. and I checked the page using http://validator.w3.org/
and it's valid now, but the problem still remain. So here's the link again

http://test543.htmlplanet.com/Move/move3.html

Thanks for the pointer

Bryan
Mozilla is usually more standard compliant than IE6 - I tried
validating your page using http://validator.w3.org/ and it contains
html errors, you should probably fix those before trying to solve the
problem.

Rob

Everything works fine in IE6. However, in Mozilla
(1.7.3), somehow the div1 and div3 overlapped.
You can see this by loading the source below into
Mozilla. I wonder if this is a bug in the Mozilla?
Also, does anyone has a solution that can be applied
to both IE6 and Mozilla?

Bryan


Jul 21 '05 #11

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

Similar topics

14
by: Amit Bhatia | last post by:
Hi there. I am cross posting this on comp.lang.c as well: sorry for same. The problem I am facing is as follows: For example: double a= 0.15; double b=2.4; const double VERYTINY =1.e-10; I...
5
by: Anton Noll | last post by:
We are using Visual Studio 2003.NET (C++) for the development of our software in the fields digital signal processing and numerical acoustics. One of our programs was working correctly if we are...
12
by: meltedown | last post by:
I would like the floating divs to float and then the header to come after them , on the left. That's what I thought clearing the floats was for, but in this example, the header is to the right of...
10
by: Shawn | last post by:
Hello all, I apologize as I am sure this has probably been dealth with before... but I am doing an exercise from "Practical C Programming" and I have been unable to get it to work perfectly due to...
7
by: Daniel Vallstrom | last post by:
I am having trouble with floating point addition because of the limited accuracy of floating types. Consider e.g. x0 += f(n) where x0 and f are of some floating type. Sometimes x0 is much larger...
15
by: michael.mcgarry | last post by:
Hi, I have a question about floating point precision in C. What is the minimum distinguishable difference between 2 floating point numbers? Does this differ for various computers? Is this...
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
32
by: ma740988 | last post by:
template <class T> inline bool isEqual( const T& a, const T& b, const T epsilon = std::numeric_limits<T>::epsilon() ) { const T diff = a - b; return ( diff <= epsilon ) && ( diff >= -epsilon );...
39
by: rembremading | last post by:
Hi all! The following piece of code has (for me) completely unexpected behaviour. (I compile it with gcc-Version 4.0.3) Something goes wrong with the integer to float conversion. Maybe somebody...
6
by: Jeremy | last post by:
I've got a floating div which becomes visible when a link is clicked. I want the div to be hidden when the user clicks anywhere on the page except for whithin the div. What is the best way to do...
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: 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...
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...
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,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.