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

Mozilla <div> can't see nested floated <div>?

I am trying to make a bunched of left-floated divs that will be
contained in a larger div. the floated divs all contain a left-floated
img and text of varying sizes. If I don't set a height (or height:auto)
the larger div doesn't seem to see the nested divs, and they spill out
the bottom.

IE seems to automatically resize the larger div as long as I set the
height to 100% or any pixel size.

Mozilla doesn't recognize the percent, and if I set it to a particular
pixel height, it will not readjust and the nested divs may still over flow

Is there a way to get Mozilla to actually put the nested divs in the
larger div?

You can see a practice page here:
http://www.happymagpie.com/cssexample.html
The blue boxes will contain images and text of different sizes. They
should be in two columns and surrounded by a red box. The page will
eventually have several red boxes, so I can't simply do a two column page.
This seems like such an obvious problem; there must be an obvious
solution I'm overlooking?
Phil
Jul 20 '05 #1
3 4991
Els
Philip wrote:
I am trying to make a bunched of left-floated divs that
will be contained in a larger div. the floated divs all
contain a left-floated img and text of varying sizes. If I
don't set a height (or height:auto) the larger div doesn't
seem to see the nested divs, and they spill out the bottom.

IE seems to automatically resize the larger div as long as
I set the height to 100% or any pixel size.

Mozilla doesn't recognize the percent, and if I set it to a
particular pixel height, it will not readjust and the
nested divs may still over flow

Is there a way to get Mozilla to actually put the nested
divs in the larger div?


Yes, the above is normal behaviour, it's IE that is the odd one
out.
Just put <div style="clear:both;"></div> inside the container
div, after the contents, right before the </div>.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Cliff Richard - Cliff Richard - Travellin' Light
Jul 20 '05 #2
.
Els wrote:
Philip wrote:

Is there a way to get Mozilla to actually put the nested
divs in the larger div?

<snip>
Yes, the above is normal behaviour, it's IE that is the odd one
out.
Just put <div style="clear:both;"></div> inside the container
div, after the contents, right before the </div>.

D'oh! Amazingly simple answer, answered amazingly fast. I should have
given up and asked an hour ago....

Thank you

Phil

Jul 20 '05 #3
Els
.. wrote:
[.==Philip]
Els wrote:
Philip wrote:
Is there a way to get Mozilla to actually put the nested
divs in the larger div?

<snip>

Yes, the above is normal behaviour, it's IE that is the
odd one out.
Just put <div style="clear:both;"></div> inside the
container div, after the contents, right before the
</div>.


D'oh! Amazingly simple answer, answered amazingly fast. I
should have given up and asked an hour ago....


I wasn't awake yet an hour ago ;-)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Gidi Gov - Fruit of the Heat
Jul 20 '05 #4

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

Similar topics

1
by: Terry | last post by:
hi guys, could anyone help me with this? I tried to put a <div> in a <td>, and a <table> in that <div>. It looks fine, but my div can't fit in my <td>, there's always a space between the bottom of...
2
by: Lars | last post by:
Hello all, Having googled around without any luck, I resort to posting my own question: Is there any way I can make a <div> adjust to the width of a contained image and line break any long text...
8
by: slim | last post by:
hi again all, i am still working on the website as mentioned in earlier threads and have hit another snag... http://awash.demon.co.uk/index.php http://awash.demon.co.uk/vd.css the php is...
7
by: Dario de Judicibus | last post by:
System: Windows XP SP1 + all latest patches (no SP2) Browser: IE 6.0.2800.1106.xpsp2.040919-1003 Problem: browser does not show, or partially shows, borders and background color of <DIV> as...
4
by: Gustaf | last post by:
I'm sure I've got this working before, but I always forget how to do it, because CSS isn't intuitive in this case. I got a simple 2 column layout: <div id="container"> <div id="left"> </div>...
5
by: Agix | last post by:
Hi there, Please check out : http://clarifysolutions.co.uk/certenroll/ The source is included below. This page is a test, so I can play about with paddings, margins and layouts using divs as...
1
by: sid | last post by:
Is it possible to float a <divon top of a <frameset ...? I need it to overlap parts of the frames. Thanks Sid.
13
Frinavale
by: Frinavale | last post by:
Hi there! I've created a "message" box that consists of a <div> with a bunch of information in it and some buttons (which could be "ok", "yes", "no", "cancel"...). It's dynamically created with...
3
by: mumebuhi | last post by:
Hi, How do you make an element (e.g. <div>) to receive focus when pressing TAB key? I understand that some elements such as <selectand <input> by default will receive focus when the TAB key is...
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
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
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...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.