Creating 2-line title in recent posts on Home page

Hi. The title of posts get cut off. I’d like to set it to show the whole title, even if it creates a 2nd line.

My website’s Home page is juanajaafar.net.

I found this code on someone else’s forum question, but if didn’t work for me:

.x-recent-posts .h-recent-posts, .x-recent-posts .x-recent-posts-date {
white-space: normal;
}

Hi there,

Thank you for reaching out to us, The code you shared with us works perfectly fine, however you can try adding the following code in the Theme Options > CSS:

.x-recent-posts .h-recent-posts, .x-recent-posts .x-recent-posts-date {
    white-space: normal !important;
}

I also checked your custom CSS and you have a missing curly bracket in your custom CSS, this will be the reason your code wasn’t working on the first place. Please find the following code:

@media (max-width: 767px) {
                .single .entry-featured {
                    width:100%;
                }

And replace it with:

@media (max-width: 767px) {
                .single .entry-featured {
                    width:100%;
                }
}

Hope this helps!

Great. How do I set the titles to align left?

Hi JJ,

To left align the titles please add this code as well in the Theme Options > CSS:

.x-recent-posts .h-recent-posts {
    text-align: left !important;
}

If you would like to learn CSS, I am sharing few resources that you take a look to get started with CSS and an interesting tool that you can use to speed up the development process.

I recommend you to watch following video that will help you to get started with CSS.

https://www.youtube.com/watch?v=MFR4WXiLzpc

Sometimes it can get a bit difficult to find out the right selector to be able to write the required CSS codes. A handy tool that can help you in this is Google Chrome dev tools. I am sharing the resource that you can refer to get started with dev tools.

https://developers.google.com/web/tools/chrome-devtools/css/

https://developers.google.com/web/tools/chrome-devtools/

https://www.youtube.com/watch?v=tP_kXBJWPhQ&t=200s

Thanks!

Great! Thank you.

You’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.