• The Cobalt Apps Community Forum is for community interaction and assistance, but is not our official Cobalt Apps Product Support solution. If you need Cobalt Apps Product Support please contact our support team through the contact form found at the bottom of your "My Account" page.

Center Page/Post title

#1
Hello,
I have been using the <center> </center> to keep each page and post titles centered, and it works but I have the code showing up in different areas.
Would there be any css code to put into the custom functions area?

Tried this code in css area and did not work, in custom functions area getting syntax error.

.title-area {
text-align: center;
}
 

siga

Moderator
#2
The <center> tag is outdated/not supported in HTML5.
CSS would go to the CSS area and not in custom functions, but to find out if your selector is correct, you´d have to provide a link to the page in question.
 
#3
Great, thank you -> Mineola Landscaping
I removed all the '<center> </center>' code from all the pages for this exercise.
I placed the code again in the Custom CSS area, with no syntax error this time.
However, The titles have not centered! They are still on the left margin.

Sorry, I do not know what a selector is.

.title-area {
text-align: center;
}
 

siga

Moderator
#4
Not sure where you got the class ".title-area" from?
For a standard page title, the CSS-selector would be h1.entry-title.

h1.entry-title {
text-align: center;
}

If you want to center all h1 titles including the page-builder titles, that would be

.fl-builder-content h1, .dynamik-page-builder .site-inner h1, #content .post h1, #content .page h1, #content h1.entry-title, #content .entry-content h1 {
color: #DB4914;
font-size: 34px;
text-align: center;
}

Here´s an explanation what a selector is (and what types of selectors exist): https://www.w3schools.com/cssref/css_selectors.asp
The above is a class selector.
 
#5
Heh! Great Siga, ! It worked nice.
Only thing, Syntax warning said that: Element (h1.entry-title) is overqualified. Just use .entry-title
Which I did.

.entry-title {
text-align: center;
}

Thank you very much for your time.
 

siga

Moderator
#6
The "overqualification" makes sure it´s true for only h1 titles. So in case you ever see other titles centered you don´t want to be centered, just remember to re-add it. :)