SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Small space under pictures?

    The top picture on www.bluevolume.com/dallasent/ is displayed using Doug's header replacement method. I'v decided that I want to just use an image tag. Here is the site with an image tag instead of the image replacement method: http://www.bluevolume.com/dallasent/index2.htm. As you may notice, the site with the img tag has a small space under the picture and above the nav bar. I'v noticed this space under the pictues on several other sites I have built. I tried specifying margin and padding to 0, but it didn't change. Any ideas as to why this is happening and how I can fix it?

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

    images are treated as text and room is allowed for descenders, so setting the img to display block should sort the problem.
    Code:
    #main img {display:block}
    Paul

  3. #3
    SitePoint Addict
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    would it be bad to just set all images to block?
    Code:
    img {display:block}

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,546
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    would it be bad to just set all images to block?
    I know some people do as a matter of course.

    It all depends whether you have text on the same line as the image that you want to align (but most times you don't want that anyway).

    It's your choice - swings and roundabouts springs to mind

    Paul


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
  •