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

Two Column Layout Issue

ZZ

I am having a bugger of a time figuring out why firefox won't
recognize my faux two-column layout. When the content column
("contcol") gets filled in with more content than the "menucol", both
"expand" properly in IE (it recognizes the background from "page" and
makes the column look expanded). In forefox (3) it doesn't do it -
the "menucol" ends with the content and the white box of the "contcol"
continues by itself. Here is the setup and CSS I am using:

<div id="page">
<div id="menucol"></div>
<div id="contcol"></div>
</div>
CSS:

#page{
width: 975px;
background-color: #CECC99;
}
#menucol{
float: left;
width: 290px;
background-color: #CECC99;
padding-top: 10px;
text-align: center;
}
#contcol{
float: right;
width: 684px;
background: #fff;
border-left: 1px solid #000;
}

Any help would be appreciated!

Thanks ahead;

Tom

Nov 17 '08 #1
5 1611
In article <ok********************************@4ax.com>,
ZZ <no***@wpenewon.orgwrote:
I am having a bugger of a time figuring out why firefox won't
recognize my faux two-column layout. When the content column
("contcol") gets filled in with more content than the "menucol", both
"expand" properly in IE (it recognizes the background from "page" and
makes the column look expanded). In forefox (3) it doesn't do it -
the "menucol" ends with the content and the white box of the "contcol"
continues by itself.
IE (at least 6) behaves differently to FF in this matter. FF is strictly
correct. You need to either put overflow: hidden; or overflow: auto; on
your container or else style a clear into a last element in the
container. Even going so far as to create an element for this purpose:
<div style="clear: both"></div>

You might get something out of:

<http://netweaver.com.au/floatHouse/>

--
dorayme
Nov 17 '08 #2
ZZ
On Tue, 18 Nov 2008 08:16:46 +1100, dorayme
<do************@optusnet.com.auwrote:
>In article <ok********************************@4ax.com>,
ZZ <no***@wpenewon.orgwrote:
>I am having a bugger of a time figuring out why firefox won't
recognize my faux two-column layout. When the content column
("contcol") gets filled in with more content than the "menucol", both
"expand" properly in IE (it recognizes the background from "page" and
makes the column look expanded). In forefox (3) it doesn't do it -
the "menucol" ends with the content and the white box of the "contcol"
continues by itself.

IE (at least 6) behaves differently to FF in this matter. FF is strictly
correct. You need to either put overflow: hidden; or overflow: auto; on
your container or else style a clear into a last element in the
container. Even going so far as to create an element for this purpose:
<div style="clear: both"></div>

You might get something out of:

<http://netweaver.com.au/floatHouse/>
Thanks, I am looking at it with the newest IE7.

I did fail to mention that I have a footer div after the container
with a clear:both in it.

However, I did user oveflow: hidden, and it worked great to fix the
issue in FF.

Thanks for all of your help,

Tom
Nov 18 '08 #3
In article <ag********************************@4ax.com>,
ZZ <no***@wpenewon.orgwrote:
On Tue, 18 Nov 2008 08:16:46 +1100, dorayme
<do************@optusnet.com.auwrote:
In article <ok********************************@4ax.com>,
ZZ <no***@wpenewon.orgwrote:
I am having a bugger of a time figuring out why firefox won't
recognize my faux two-column layout. When the content column
("contcol") gets filled in with more content than the "menucol", both
"expand" properly in IE (it recognizes the background from "page" and
makes the column look expanded). In forefox (3) it doesn't do it -
the "menucol" ends with the content and the white box of the "contcol"
continues by itself.
IE (at least 6) behaves differently to FF in this matter. FF is strictly
correct. You need to either put overflow: hidden; or overflow: auto; on
your container or else style a clear into a last element in the
container. Even going so far as to create an element for this purpose:
<div style="clear: both"></div>

You might get something out of:

<http://netweaver.com.au/floatHouse/>

Thanks, I am looking at it with the newest IE7.
It is not really advisable, see the preamble! But at least it is better
than reading it with IE 6. <g>
I did fail to mention that I have a footer div after the container
with a clear:both in it.
That will not work. The clearing element, if it is to make the container
grow height, must be in the container itself and generally be the last
thing before the container says goodnight.
However, I did user oveflow: hidden, and it worked great to fix the
issue in FF.
And many other modern browsers too.

--
dorayme
Nov 18 '08 #4
ZZ
On Wed, 19 Nov 2008 06:11:47 +1100, dorayme
<do************@optusnet.com.auwrote:
>In article <ag********************************@4ax.com>,
ZZ <no***@wpenewon.orgwrote:
>On Tue, 18 Nov 2008 08:16:46 +1100, dorayme
<do************@optusnet.com.auwrote:
>In article <ok********************************@4ax.com>,
ZZ <no***@wpenewon.orgwrote:

I am having a bugger of a time figuring out why firefox won't
recognize my faux two-column layout. When the content column
("contcol") gets filled in with more content than the "menucol", both
"expand" properly in IE (it recognizes the background from "page" and
makes the column look expanded). In forefox (3) it doesn't do it -
the "menucol" ends with the content and the white box of the "contcol"
continues by itself.

IE (at least 6) behaves differently to FF in this matter. FF is strictly
correct. You need to either put overflow: hidden; or overflow: auto; on
your container or else style a clear into a last element in the
container. Even going so far as to create an element for this purpose:
<div style="clear: both"></div>

You might get something out of:

<http://netweaver.com.au/floatHouse/>

Thanks, I am looking at it with the newest IE7.

It is not really advisable, see the preamble! But at least it is better
than reading it with IE 6. <g>
>I did fail to mention that I have a footer div after the container
with a clear:both in it.

That will not work. The clearing element, if it is to make the container
grow height, must be in the container itself and generally be the last
thing before the container says goodnight.
>However, I did user oveflow: hidden, and it worked great to fix the
issue in FF.
And many other modern browsers too.


And just to follow-up for anyone else who encounters this - having
your doctype at the top of your page is important for the browser.

Thanks again for your help,

Tom

Nov 19 '08 #5

ZZ wrote:
>
And just to follow-up for anyone else who encounters this - having
your doctype at the top of your page is important for the browser.
It's not just the DOCTYPE, but which DOCTYPE. They are not all created equally.

--
Berg
Nov 19 '08 #6

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

Similar topics

8
by: Zak McGregor | last post by:
Hi all I have a simple 3 column css layout here: http://www.carfolio.com/newlook.dhtml However, when the centre column is wider than the screen (yes, it does happen on some pages on the site...
16
by: Jef Driesen | last post by:
I have created a nice idea for a website and now I would like to translate that idea in (x)html and css. The layout is quite basic: a header, two columns and a footer. For a graphical presentation,...
3
by: =?ISO-8859-1?Q?Ney_Andr=E9_de_Mello_Zunino?= | last post by:
Hello. I seek confirmation for the reasons behind a margin-related behavior I have observed. I have set up a simple test page to illustrate the issue. The page shows a very simple 2-column...
1
Death Slaught
by: Death Slaught | last post by:
I will be showing you how to make a very simple but effective three column layout. First we will begin with the HTML, or structure, of our three column layout. <!DOCTYPE html PUBLIC...
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: 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
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.