Connecting Tech Pros Worldwide Forums | Help | Site Map

Floating div problem

NoSpan
Guest
 
Posts: n/a
#1: Jul 21 '05
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 -----------------

brucie
Guest
 
Posts: n/a
#2: Jul 21 '05

re: Floating div problem


In comp.infosystems.www.authoring.stylesheets NoSpan said:
[color=blue]
> You can see this by loading the source below into
> Mozilla.[/color]

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.
Neal
Guest
 
Posts: n/a
#3: Jul 21 '05

re: Floating div problem


On Tue, 02 Nov 2004 15:53:13 -0800, NoSpan <NoSpam@hotmail.com> wrote:
[color=blue]
> I have this page that has layout like the following:
> (no frameset)[/color]

This requires a URL for any effective help.
Big Bill
Guest
 
Posts: n/a
#4: Jul 21 '05

re: Floating div problem


On Wed, 3 Nov 2004 10:24:02 +1000, brucie <shit@usenetshit.info>
wrote:
[color=blue]
>In comp.infosystems.www.authoring.stylesheets NoSpan said:
>[color=green]
>> You can see this by loading the source below into
>> Mozilla.[/color]
>
>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.[/color]

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!
brucie
Guest
 
Posts: n/a
#5: Jul 21 '05

re: Floating div problem


In comp.infosystems.www.authoring.stylesheets Big Bill said:
[color=blue]
> Well if you could take six years just to type that and be bitchy.....[/color]

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.
NoSpan
Guest
 
Posts: n/a
#6: Jul 21 '05

re: Floating div problem


Neal wrote:[color=blue]
> On Tue, 02 Nov 2004 15:53:13 -0800, NoSpan <NoSpam@hotmail.com> wrote:
>[color=green]
>> I have this page that has layout like the following:
>> (no frameset)[/color]
>
>
> This requires a URL for any effective help.[/color]
Since 2 people suggest I use an URL, I will try to find a free web space
and come back again.

Bryan
Neal
Guest
 
Posts: n/a
#7: Jul 21 '05

re: Floating div problem


On Wed, 03 Nov 2004 06:29:36 GMT, Big Bill <kruse@cityscape.co.uk> wrote:
[color=blue]
> Well if you could take six years just to type that and be bitchy.....[/color]

brucie doesn't type. He uses a pointy stick interface.
Big Bill
Guest
 
Posts: n/a
#8: Jul 21 '05

re: Floating div problem


On Wed, 3 Nov 2004 21:21:52 +1000, brucie <shit@usenetshit.info>
wrote:
[color=blue]
>In comp.infosystems.www.authoring.stylesheets Big Bill said:
>[color=green]
>> Well if you could take six years just to type that and be bitchy.....[/color]
>
>shouldn't you be obsessing over search engines somewhere?[/color]

Everyone needs a holiday.

BB (except you, before you say it).
www.kruse.co.uk
The home of SEO that's shiny!
NoSpan
Guest
 
Posts: n/a
#9: Jul 21 '05

re: Floating div problem


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
news@robdavis.plus.com
Guest
 
Posts: n/a
#10: Jul 21 '05

re: Floating div problem


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
[color=blue]
>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[/color]

NoSpan
Guest
 
Posts: n/a
#11: Jul 21 '05

re: Floating div problem


news@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[color=blue]
> 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
>
>[color=green]
>>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[/color]
>
>[/color]
Closed Thread


Similar HTML / CSS bytes