SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    @alexstanford Alex's Avatar
    Join Date
    Apr 2004
    Location
    Jacksonville, Florida
    Posts
    759
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Aligning text next to an image...

    I have an image, and text to the right of it, I want the text to align in the middle of the image, what do I do that is CSS and XHTML Strict compliant?
    Alex Stanford @alexstanford tumblog about.me in fb G+ K
    TechTalkin The Premier Community for Technology Enthusiasts and Professionals
    Full Ambit Media Zero Sacrifice Web Design & Development; Made in the USA @fullambit in fb G+ K

  2. #2
    SitePoint Guru
    Join Date
    May 2004
    Location
    santa rosa, ca
    Posts
    969
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put the text and image inside a <p></p> and vertical-align: middle the image

    Something like this should do it for you:
    img.rightimage {
    float: right;
    padding: 3px;
    margin-left: 6px;
    vertical-align: middle;
    }
    nondenominational, noncommercial, nonprofit,
    listener-supported, 24-hour, Christian ministry:
    Listen Live Online


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
  •