SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2010
    Location
    Israel
    Posts
    523
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Div height is bugged

    Hello everyone
    Its alittle bit hard to explain so i've uploaded the page with the relevant code only here:
    http://sospets.brinkster.net/htmlpage.htm
    As u can see the problem is that the div doesnt calculate its height correctly, as the image is overlapping the div, how do i fix this problem?
    i know it has something to do with the floating because when i remove it its fine (but then the image is not positioned correctly)

    Thanks for the help

  2. #2
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,881
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    I can see that it doesn't look right, but I'm not sure what you want to happen.

    Should the <div> stretch to enclose the image. Should the image follow the <div>? Should the image be beside (but outside) the <div>?

  3. #3
    SitePoint Evangelist
    Join Date
    Jun 2010
    Location
    Israel
    Posts
    523
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    the image should be inside the div, its part of the content, so in other words, yes the div needs to stretch to enclose the image

  4. #4
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,085
    Mentioned
    255 Post(s)
    Tagged
    5 Thread(s)
    Adding the float property to #round and #round div will contain the image.

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2010
    Location
    Israel
    Posts
    523
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    thanks, solved


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
  •