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

WordPress

Sheri Barker
Sheri Barker
1,066 Points

Wordpress table - another text alignment issue

I've taken over the site management for a law firm and am trying to fix another issue with a table. I think it's a padding or margin issue but I thought I'd post here for help.

http://www.udalllaw.com/attorneys/

Some of the text to the right of the photos is not aligning correctly. Can anyone help me correct this?

1 Answer

Sandra Weber
Sandra Weber
1,531 Points

Hi Sheri,

For each table cell, try putting the img inside one div and the text inside another div. Then remove the float and display properties from the img tag in your CSS, and put "float: left" and "display: inline-block" on the div that the image is in. Inline-block makes the image's div reserve its own "block" of space and not let the contents of the next div wrap below it. Since the two divs are right next to each other, the content from the 2nd one will now never wrap into the space taken up by the first one.