How to center the H1 and color the H2?

Posted in: Newspaper
Post count: 460

Hello team,

I don’t know how to do it, but it would be great if I could focus the title of the publications on my website (H1). Is it possible? do i need a special code?

https://fotos.subefotos.com/dc476a89b0230df3fcc4fd55586a9dcfo.jpg

Taking advantage of the consultation, I would like to ask if it is possible to put the H2’s of a specific colour by default? I can’t find that option in the theme control panel.

https://fotos.subefotos.com/053cad3335e319be8a5f231070c361d2o.jpg

my web: soyunperro.com

Thanks!

  • This topic was modified 8 years by Jose.
Post count: 23312

Hello Jose,

Please try using the code below and place it in Theme panel -> Custom CSS Area.

.td-post-template-5 .td-post-header .entry-title{
text-align:center;
}
.single h2 {
color:red!important;
}

The result is here -> https://www.screencast.com/t/JpOqNDk7Un

Thanks.

Post count: 460

Hi @Catalin,

Thanks for reply 🙂

Perfect! I do it and now all run ok 🙂 But I have two warnings. Is that normal?

https://fotos.subefotos.com/5256dcb456cb7e06d559df2d1cb4d8ebo.jpg
https://fotos.subefotos.com/53dd24b01d1cc4b60a391c043cc5d241o.jpg

If I may, one last consult:

How can I get a color line underneath my H2?

Similar to this one: https://fotos.subefotos.com/fe0c3d286f77029e27edf0c40a1887f7o.jpg

(original website https://www.onepagezen.com/free-ssl-certificate-wordpress-google-cloud-bitnami/ )

I’ve tried this code, but it doesn’t seem to work:

h2.borde {
border-style: solid;
border-width: 0px 0px 3px 0px;
border-color: #fc6;
}

I’m sorry, my programming skills are flawed.

Have a nice day!

  • This reply was modified 8 years by Jose.
Post count: 23312

Hello,

You should try using the code below and place it in Theme panel -> Custom CSS area.

#post h1.header{
border-color:green;
}

The result is here -> https://www.screencast.com/t/1MxgSUsg

But I guess that you are not using our theme on your website…

Thanks.

Post count: 460

Yeah!!

Thank you very much!!

I always do my support renewal, precisely because of how well you handle your queries. Very attentive and professional, a great team for a great theme.

Greetings!

Post count: 23312

Hello Jose,

Thank you for your kind words.

Thanks.

Post count: 460

Hello @Catalin ,

Sorry but I dont know why not run:

https://fotos.subefotos.com/ab489fa327779bc172abb8c133e8da19o.jpg

url: encantadordeperros.com

I put the code, delete caché but… not run.

Can you help me please?

PD. yes, I use your theme in my website always 🙂

  • This reply was modified 8 years by Jose.
Post count: 23312

Hello Jose,

Try to add the !important tag to your code value and check the results.

Thanks for your understanding!

Post count: 460

Hello @Catalin

I don’t know if I’m doing it right, I don’t think so. I can’t see results on the web, everything is still the same.

https://fotos.subefotos.com/045d017afe7906794679a48b6f82c126o.jpg

AND…

.td-post-template-5 .td-post-header .entry-title{
text-align:center;
}
.single h2 {
color:red!important;
}

This other code seems to work very well on pc and mobile, but it doesn’t work on AMP. How can I make it work on AMP too?

Thank you

Post count: 20688

Hi,

Let’s try to identify the problem here. So from what I understand you want to add a border bottom for your h2 in the post content, like this
https://www.screencast.com/t/yMyAhBQ0qo
WordPress used to have an underline button, but it was removed. So now CSS could be used or maybe trying to re-add the lost option and using it
http://www.wpbeginner.com/plugins/how-to-add-underline-and-justify-text-buttons-in-wordpress/
In my example I used this code, note that it will affect all the h2 in every post. You may change the border size, type and color if needed
https://www.w3schools.com/css/css_border.asp

.td-post-content h2 {
border-bottom: 2px solid black;
}

Remove the previous code for the border, this one is all that is needed.

Thanks

Post count: 460

Hello @Simion C.

Wow, now Now it’s working perfectly, it’s just what I wanted.

Thank you very much for your help 🙂

About this other code:

.td-post-template-5 .td-post-header .entry-title{
text-align:center;
}
.single h2 {
color:red!important;
}

How can I make it work on AMP pages? Well, I don’t know if it’s possible, maybe it’s not allowed in AMP.

Have a nice day! Jose from Spain.

PD. It might be a good suggestion to create your own text editor for the theme? Is only a idea

Post count: 20688

Hi,

Unfortunately our AMP plugin does not have a custom CSS panel at this moment. So you would have to enter the code directly in the plugin files. Which is not a good solution because if the plugin receives an update the entered code will be lost.

We will try to add more features to the AMP plugin in the future, so a custom code options may be implemented.

If you want to edit the plugin and add code in it, this would be a similar topic
https://forum.tagdiv.com/topic/custom-css-in-amp-posts/

WordPress is developing the new Gutenberg editor which will be available in the future
https://wordpress.org/gutenberg/
https://testgutenberg.com/
We do not have any plans to develop a new editor, at least I am not aware of such plans.

Thanks

Viewing 12 posts - 1 through 12 (of 12 total)
The forum ‘Newspaper’ is closed to new topics and replies.