SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast thehung1724's Avatar
    Join Date
    Sep 2013
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    White-space under image?

    Hello everyone, I'm newbie designer and today I get some problems that white-space under image. Hope anyone can suggest me. Thank for reading.

    Check my code here:
    Code:
    http://codepen.io/anon/pen/etJCf
    Attached Images Attached Images

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,176
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    An oldie, but a goodie! You can cure that either with

    Code:
    img {display: block;}
    or

    Code:
    img {vertical-align: bottom;}
    The reason it happens is that, by default, images align with the baseline of any text that might sit beside them (images being inline elements by default).

  3. #3
    SitePoint Enthusiast thehung1724's Avatar
    Join Date
    Sep 2013
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank for your support. It solved my problem.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,176
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    You're welcome. I think it's the first question I ever asked in a forum, and I remember how frustrating and confusing that white space was!

    PS—Thanks for providing a nice clear CodePen example.

  5. #5
    SitePoint Enthusiast thehung1724's Avatar
    Join Date
    Sep 2013
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I remind your memory

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,176
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Indeed.


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
  •