473,802 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firefox Division Extend

Jezternz
145 New Member
Okay basicly, I have a division inside a division.
[HTML]<html><body>
<div id="container" >
<div id="header">Mai n image</div>
</div>
</body>
</html>[/HTML]
and I want the container to grow as the the div's inside it are added. But for some reason it only grows if I add characters into it.(note this happens in FF, works fine in ie)
eg:
[HTML]<html><body>
<div id="container" >
<div id="header">Mai n image</div>
</div>A
</body>
</html>[/HTML]
CSS code:
Expand|Select|Wrap|Line Numbers
  1. html{
  2.     margin: 0 auto;
  3.     width:100%;
  4.     overflow: -moz-scrollbars-vertical;
  5. }
  6. body{
  7.     margin: 0 auto;
  8.     width:100%;
  9. }
  10. #container{
  11.     margin: 0 auto;
  12.     padding:0;
  13.     width: 970px;
  14. }
  15. #header{
  16.      float:left;
  17.      height:100px;
  18.     width: 960px;    
  19.     margin:0 5px;
  20. }
  21.  
It will grow by itself in IE, which is what I want however it wont by itself in FF :(
help please
May 22 '08 #1
2 1509
drhowarddrfine
7,435 Recognized Expert Expert
This is a bug in IE. Firefox is performing correctly. Parent elements are never to expand to contain floated elements. To get Firefox to do what IE is mistakenly doing, add overflow:auto to the parent element.

When the two browsers do things differently, always know IE is almost always the one doing something wrong.
May 22 '08 #2
Jezternz
145 New Member
yeh I have learnt that it is normally IE doing the wrong thing, but just from my observed point of view IE was doin what I wanted it to, even if it was wrong code-wise.
Thanks!
May 22 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

24
19398
by: Teis Draiby | last post by:
In .NET, can I be sure that the result of a division between two integers always is truncated rather that rounded to nearest? Example: 99 / 50 = 1 regards, Teis
1
2077
by: gaehn gaehn | last post by:
Here is my problem in a nutshell: a script to model dynamic table extension. It works under Firefox. But IE just aborts, complaining about an "unknown runtime error" in the line with "innerHTML". Why? <html><head></head><body> <script language="javascript"> function extend() { var tb = document.getElementById('thetable').tBodies; var newrow = document.createElement('tr');
13
6359
by: rbronson1976 | last post by:
Hi all, I have a very simple page that Firefox has problems with: www.absolutejava.com/testing.htm First of all, this page seems to be perfectly valid XHTML Strict. Both the W3C validator as well as Page Valet indicate it is valid. The page is being served with the proper MIME type of "application/xhtml+xml". Unfortunately, Firefox will not display the page due to a non-breaking
6
4039
by: laramie.hartmann | last post by:
I have a script (see below) that accesses a XML file and displays the contents through a series of document.write calls. This all works fine in IE, but not at all in Firefox. I get no errors in the javascript console, but when I try to load the elements by tag name and look at the length it is always 0 as if no elements have been added. Any suggestions are greatly appreciated as I've been stuck on this for a while now. Thanks,
1
1785
by: Horny LaBelle | last post by:
The following style sheet for creating drop caps works fine in Safari, Opera, Omniweb and Explorer, the drop caps extend over 3 lines. Only in Firefox it doesn't look as it should, they extend over nearly 4 lines (under Mac OS X). With Firefox under Windows, they extend over 3 lines but are shifted too high. Any idea/solution? Thanks
7
4695
by: Matt Kruse | last post by:
Is it possible to extend the HTMLCollection prototype in Firefox (>=2.0)? It looks like I can do it, but it doesn't work: HTMLCollection.prototype.funk = function() { alert(this.length); } window.onload= function() { var x = document.getElementsByTagName('div'); alert(HTMLCollection.prototype.funk); // function() { ... } alert(x instanceof HTMLCollection); // true alert(x.item===HTMLCollection.prototype.item); // false x.funk(); //...
2
3654
by: jagadeeshdandu | last post by:
Hi, I am trying to apply the shadow using JQuery for a division, it is working fine, but border of the division is not displaying and if Im trying to hide the division then it is taking a lot of time (around 10 seconds) to hide. I am facing these problems in FireFox only, it is working fine in IE. If you could suggest me anything that would rectify this problem, it would be very helpful. Thank you in advance.
10
1424
by: marcstuart | last post by:
How do I divide a list into a set group of sublist's- if the list is not evenly dividable ? consider this example: x = y = 3 # number of lists I want to break x into z = y/x what I would like to get is 3 sublists
1
4228
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being aligned to the top, along with the slideshow and link buttons, you have to scroll down to see the text - how can I make IE6 display correctly? http://geekarama.co.uk/new_home.html here is the code for new_home.html and following that the CSS...
0
9562
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10285
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10063
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7598
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6838
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.