SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2003
    Location
    London
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question img float problem in Opera & Netscape

    Hi,

    I have recently changed a site from a table layout to CSS-P layout. I've got most of it working but I have a problem with the layout of the photos page (http://www.stayinmyvilla.com/photos.php).

    It looks ok in Opera 7.01, Mozilla 1.4 and IE6.0 but in Opera 5 and 6 the images won't wrap and disapear off the edge of the screen and in Netscape 6 the images wrap but after the first row of images they overlap each other (see attached images).

    I took the html and css for the image float wrapping from "Practical CSS Layout tips, tricks & techniques" on AListApart (http://www.alistapart.com/stories/practicalcss/).

    Does anyone know what I can do to fix this so that the images wrap within the container div?

    thanks,
    Anne Marie

    [edit: Sorry, I've just realised this should probably be in the browser issues forum. Could somebody move it for me? Thanks.]
    Attached Images Attached Images
    Last edited by amdenley; Sep 7, 2003 at 07:31. Reason: wrong forum

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,877
    Mentioned
    160 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    Floats usually like a width in order to render correctly (unless its an image then the intrinsic width of the image is used).

    Try something like:
    Code:
     div.float {
     width: 125px;
     margin: 0;
     border-width: 0;
     padding: 10px;
     float: left;
     }
    (Assuming of course your images can be contained in 125px.)

    The above cures the problem for Opera 6.

    I only have Netscape 6.2 and the images were working ok in that so I can't tell if it will sort the problem in version 6.

    Hope this helps.

    Paul

  3. #3
    SitePoint Member
    Join Date
    Aug 2003
    Location
    London
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Paul, that does seem to have fixed it for Opera 5 & 6. There's still no change in NS6.

    Does anyone else have any ideas?


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
  •