Site logo

Archived topic

Error when adding a code to justify text of a custom excerpt

5 replies · Started by Jerome on April 21, 2021

Viewing posts 1–6 of 6

Hi,

I would like to justify the text of a custom excerpt. I found and tried this already :

.entry-summary {
text-align: justify;
}

But when i'm trying to activate it, i have an error message telling me :

The code extract that you're trying to activate generated an error in line 1 :
syntax error, unexpected '.', expecting end of file

Is there a a way to fix this?

Thank you very much

Hi there,

Does the code start on line 1 of the customizer css ?

If it is then remove it and copy and paste this code:

.entry-summary {
  text-align: justify;
}

Yes, it starts line 1 as you can see in my screenshot below :

https://ibb.co/ncC6vbj

I use Code Snippets to add it.

It's still not working.

You can't add CSS to Code Snippets like that..

Go back to your Customizer CSS and delete what you have, then copy and paste the code i provided - it sounds like there was a bad character that is causing the error. Does the error go away if you do that?

It worked. Thank you very much David!

Glad to hear that!

This archived topic is closed to new replies.