Title length to match text length on blog

Hi there,

Im trying to match my blog post title to the length of my blog text

Hello Carolina,

Thanks for reaching out. :slight_smile:

You can add following CSS under Pro > Theme Options > CSS:

h1.entry-title {
    width: 75%;
}

1- I have found the proper CSS code selector using the Chrome browser Developer Toolbar: https://www.youtube.com/watch?v=wcFnnxfA70g

2- For the CSS code itself, I suggest that you get started with this tutorial: https://www.youtube.com/watch?v=yfoY53QXEnI

Thanks.

That code works however its 75% margin on mobile, I think what I need is max-width 800px which is currently what I have on all the text…how do I achieve that for the titles?

Hi Carolina,

It’s should be the same as max-width, please change it to this

h1.entry-title {
 max-width: 800px;
}

Since it’s max-width then it should have no effect for the smaller device.

Hope this helps.

I put that in the global CSS and unfortunately it has not worked.

Hi @123JH,

You forgot to add the closed bracket(}) in your custom CSS.

Please find this custom CSS:

.x-scroll-top.right {
     z-index: 999999;
h1.entry-title {
     max-width: 800px;
}

And change to this:

.x-scroll-top.right {
	z-index: 999999;
}
h1.entry-title {
    max-width: 800px;
}

Let us know how it goes!

It worked thank you soo much!!

Glad we were able to help you :slight_smile:

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