SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    simple expanding box in a float IE break

    Hi guys im experimenting with content expanding boxes using the float technique and i can't fix it up for internet explorer and hope someone can help. I need a background colour bar in the box but in IE it always decides to break the box over the whole width of the screen instead of the other browsers fitting it with the boxes content.

    To see what i mean have a look at it in IE then firefox. How can i fix this up any ideas, i don't want to add a width if i don't have to and it seems to want to work in all other browsers i've tried apart from IE....

    thanks, example:

    http://www.designedfromscratch.com/1...E100Width.html

  2. #2
    SitePoint Enthusiast Northern Star's Avatar
    Join Date
    Aug 2006
    Location
    Cheshire, UK
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure there is a way of doing this. As a rule, in IE, any div will automatically will the space it has, if no width is provided.
    "If it ain't broken, don't fix it!"
    ----
    Northern Star - Web design, stategy & development.

  3. #3
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of inserting a block level element above your content, why not give the first element a border-top?

  4. #4
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea i was hoping to add text in the bar so a border top wouldn't really work here although otherwise that would be a good solution...

  5. #5
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So Guys, can you confirm theres no solution to this problem so ill have to add a width on the container or something, thanks!!!

    dave


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
  •