Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2007
    Location
    UK North Yorkshire
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS creating margins on images randomly in IE7 and firefox but not in Opera

    Hi all,

    I have a puzzling problem with some images that are placed dynamically. For some reason in IE7 and FireFox some of the images seem to develop a margin or something that is pushing the border of the image a few pixels away only on the bottom edge.
    If you look here
    the main image has a gap between the base and the border and so does the corresponding thumbnail to the right. If you look at the second thumbnail down it too has a gap but if you click on it to display the corresponding main image, the main image when displayed does not show a gap?!

    Both images' sizes are not defined in the html in the page and the css for the main image is
    Code:
    img.main
    {
    	position:absolute;
    	top:340px;
    	left:250px;
    	border:1px solid #000000;
    }
    and for the thumbnail
    Code:
    img.thumb
    {
    	border:1px solid #000000;
    	margin:3px;
    }
    the images are stored in a database as binary data which may be the problem but i did not develop the dynamic side to the site so have no idea.

    Any help would be appreciated.

    Also i know this is a css thread and this may be a javascript question but the thumbnails on the right are given a scroll bar using the overflow:auto property and if you scroll to the bottom and click the thumb to display the main image the scroll bar resets itself to the top again which is frustrating. Any ideas how i can fix it to maintain the position it was in when it was clicked??

    Many thanks in advance.

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    try adding

    padding:0px;

    to the images

    HTH
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    New to the CF scene
    Join Date
    Apr 2007
    Location
    UK North Yorkshire
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for that whizard unfortunately it didnt have any effect.


  •  

    Posting Permissions

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