Results 1 to 3 of 3

Thread: text with image vertical align

  1. #1
    Join Date
    Jul 2008
    Posts
    81
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Default text with image vertical align

    Hi

    I have a line with image + text.
    If the image height is longer than the text, so the text is going down.
    like this:
    ____[] ( []=picture )

    What should I do in order to align them to the middle
    like this:
    ---[] ( []=picture )

    Thanks!

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Have you tried using CSS' vertical-align property:
    Code:
    <img src="whatever.jpg" alt="myimage" style="vertical-align:middle;">
    Hope that makes sense.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Jul 2008
    Posts
    81
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Default

    Quote Originally Posted by rangana View Post
    Have you tried using CSS' vertical-align property:
    Code:
    <img src="whatever.jpg" alt="myimage" style="vertical-align:middle;">
    Hope that makes sense.
    GREAT!!
    Thank you !!!

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
  •