Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

John Levy
John Levy
1,451 Points

How to place a image on the same line as text

I am trying to place a image on the same line as the text. I want to place the image on the right. I have tried float: right; but that does not work. I have attached the code below. How can I make the image line up on the right hand side rather than falling below the text? http://codepen.io/Johned22/pen/NbpPJJ

Thanks in advance

1 Answer

This should do it:

.image {
  vertical-align: middle;
}

That will be next to the text. You can still use float: right if you need.