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

Brandon Brigham
Brandon Brigham
3,716 Points

Helping with Alignment in WordPress page

Hello -

Need help with this page: http://8de.db2.myftpupload.com/articles-media/

The videos section. When moving the browser window smaller the videos become un-aligned. The reason for this is the longer video titles - If there is a long video title I want the videos to stay aligned.

So I need some sort of bottom absolute padding or margin below the titles that will keep it consistent.

I tried to create a separate row for the titles above the videos but when you go to mobile if you have the problem of the titles not matching up with the videos.

Please help. Thanks!

Brandon Brigham
Brandon Brigham
3,716 Points

Yes you are the man!!!

Thank you!

1 Answer

Gregor Ojstersek
Gregor Ojstersek
17,618 Points

Hey,

I believe you have a problem with vc_custom_1478650657811 class with margin-left: 40px !important;. Try deleting it. Also you might want to delete class vc_empty_space with height 40px, for the consistency or make the same class after/before all the video containers.

Brandon Brigham
Brandon Brigham
3,716 Points

Hi Gregor -

So I want that left and right padding but am wondering if there is a way to keep a constant alignment with the top of the video titles - Basically if a video title takes up two lines I want them to stay aligned , if that makes sense.

Gregor Ojstersek
Gregor Ojstersek
17,618 Points

Definitely. You can try with display: table-cell on the video title and specify the height of the cell - the height is the key here. And then you can vertical align the text to middle. You will get the title to stay in the middle. Here is the fiddle: https://jsfiddle.net/418rL5s8/2/