Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jul 2004
    Posts
    3
    Member #
    6550
    Hello I have this IE problem with image fitting exactly in the div. There is always some room at the bottom of the div. Even if I specify the size of the div as big as the image or even smaller..

    Anyways ... it`s possible to get past it with setting no border values to the div with image ... and then creating a new div with the measurements of an image beneath it... and setting z-index if needed...

    Is there a more relayable way of doing this ... any good ways to get past this bug?

    Thnak you!

  2.  

  3. #2
    Senior Member jlgosse's Avatar
    Join Date
    Jan 2004
    Location
    Newfoundland, Canada
    Posts
    1,037
    Member #
    4570
    Liked
    7 times
    The room at the bottom of the DIV is either whitespace or a padding/margin issue.

    The following code will get rid of margins/paddings:
    Code:
    <div style="margin:0px;padding:0px;">Whatever.</div>
    Now, I'm 90% sure it's a whitespace problem, and this makes your code ugly:
    Code:
    <div><img src="http://yousite.com/dir/file.jpg" alt="whatever" /></div>
    Basically, you can't have a space after the <div> or the <img> tag, this includes newline characters. Do NOT press enter after you put the <img> tag there.


  4. #3
    Junior Member glide's Avatar
    Join Date
    Jul 2004
    Location
    Bristol, UK
    Posts
    6
    Member #
    6552
    You could always set the image as a background property of the div, like so ...

    <div width="...px" height="...px" style="background:url('http://yousite.com/dir/file.jpg');">
    Whatever text over the top of the background image.</div>

    But leave the </div> uptight to the last character within the div.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:36 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com