SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    GRAPHIC DESIGNER visualkreations's Avatar
    Join Date
    Sep 2005
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    div inside a div !!!

    Hi,

    Can someone please help me with this problem?


    I have a div called bigdiv and inside that div i have a div called smalldiv.

    now when i put in some content inside smalldiv bigdiv does not stretch in firefox , however it stretches fine in ie. does this make sense?




    Thanks

  2. #2
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If there are no positioning or sizing styles attached to either div, then the normal action is for the outer to expand with the inner.

    However, if the inner div is floated, it is taken out of the document flow and the outer div will not surround it - this is the proper behaviour that IE gets wrong. If this is your case, read the section on clearing floats in Paul's "CSS FAQ" sticky thread at the top of this forum.

    If the outer div has a height set, then the proper action is for the height to remain at the setting and excess content will spill outside it. IE ignores the set height and expands the outer anyway.

    If you are not sure which scenario applies to your situation, post up the code you are using (including css).

  3. #3
    GRAPHIC DESIGNER visualkreations's Avatar
    Join Date
    Sep 2005
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot!

    you were exactly right

    my inner div had a float and was ruining everything.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •