Jump to content


Photo
- - - - -
Resolved

Change Colors Of Fonts In H1, H2, H3 Etc. Tags Throughout The Site.



  • Please log in to reply
8 replies to this topic

#1 Bulldog

Bulldog

    Member

  • Members
  • 11 posts
  • LocationCincinnati, OH
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 24 November 2012 - 08:30 PM

I would like to find a way to change the color of all the h1 to blue or some other color on a sitewide basis.

I can change the font, font weight etc in the Typography but I can see no way to change the color. I am new to CSS etc so I get lost easily.

Any ideas?

The sites I'm working on now are

Please Login or Register to see this Hidden Content

and

Please Login or Register to see this Hidden Content



Chris

#2 Bulldog

Bulldog

    Member

  • Members
  • 11 posts
  • LocationCincinnati, OH
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 24 November 2012 - 08:40 PM

I did find the Text Headers Colors that makes all headers the same color in the Color Control Section.

Can I make h1, H2 one color and h3, h4 another?

#3 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 25 November 2012 - 03:14 AM

Chris,

The most effective and guaranteed way of accomplishing this is with CSS. This link will help you learn a good bit about CSS:

Please Login or Register to see this Hidden Content



Yes, you can have h1 and h2 one color, and h3 and h4 in another, or individual colors for each if you wanted.

#4 Bulldog

Bulldog

    Member

  • Members
  • 11 posts
  • LocationCincinnati, OH
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 25 November 2012 - 11:23 AM

Hi Rob

Thanks for the quick reply. I am concerened about modifying CSS because the files may get overwritten during an upgrade of other change? Is there a way add the CSS without this risk and how do I determine where?

The sites I'm working on now are

Please Login or Register to see this Hidden Content

and

Please Login or Register to see this Hidden Content



I find the size of the h1/h2 tags to be quite large and I should use them for SEO purposes. Where are these sizes kept/created?

Thanks

Chris Cane (BULLDG)
a Real CSS Newbie!

#5 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 25 November 2012 - 06:40 PM

Chris,

If you use Firebug and find the CSS you want to change, paste the modified code to Dashboard > PageLines > Site Options > Custom Code in the CSS Rules area.

This writes the CSS dynamically to the database. If an update is made to PageLines or plugins, the CSS then remains constant.

Additionally, we provide the PageLines Customize plugin, which has a stylesheet that also remains outside the update process. Finally, if you're using a child theme, there's a stylesheet in that which is also immune to updates.

#6 Bulldog

Bulldog

    Member

  • Members
  • 11 posts
  • LocationCincinnati, OH
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 25 November 2012 - 10:04 PM

I can see that I am not equipped to do this and make these types of changes. I have been a computer hobbyist sinc 1977 and working on websites since 1997 and I now lost. You guys have created a great tool in Pagelines but for a non-geek like me, it creates many challenges. I would have thought that defining the h1, h2 tags etc would have been done within the theme as it is in many other WP themes I've used.

I am going to have to get some help somewhere.

This is tough sledding for an old fart like me.

Firebug gave the attached code/file for the line I selected "UVB Narrowband or UVB NB is used in the treatment of:" on the home page of

Please Login or Register to see this Hidden Content



It is beyond me

1) How to edit.
2) How much to put in the "Custom Code" CSS area.

I'm going to go have a glass of boubon and drown my sorrows.

Chris Cane

Attached Files



#7 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 25 November 2012 - 11:44 PM

Okay, here's an example CSS

You presently have

Please Login or Register to see this Hidden Content


If you go to Dashboard > PageLines > Site Options > Custom Code, the first data field is CSS Rules. You will see body {}

Right below that line, add

Please Login or Register to see this Hidden Content


You can change the number to the size you prefer. That example increases the font by 10px. I tested it here:

Please Login or Register to see this Hidden Content



Now, when using Firebug, on the left you'll see an icon with a little rectangle with a blue arrow pointing into it. Click that, then click on the element you want to inspect. That allows you to see the specific CSS in the right hand box for that element.

There's a little menu of related elements above the HTML code. If you see H1 or H2 click that and then the related CSS for that bit will appear on the right. If you see similar text, you'll be able to test it to resize.

Now about color. This is your default:

Please Login or Register to see this Hidden Content


If you want all the sizes the same color as well as site and entry title, just change that next line color: #000000; to a color code you want. See

Please Login or Register to see this Hidden Content



If you only want a few of those sizes to be blue, then edit the code and paste it in the next line on your CSS like this:

Please Login or Register to see this Hidden Content


By the way, that's a vibrant, deep blue.

#8 Bulldog

Bulldog

    Member

  • Members
  • 11 posts
  • LocationCincinnati, OH
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 26 November 2012 - 11:11 AM

Thanks Rob! :)

I really appreciate you taking the time to show me how to do this. I guess, I'm going to have to become a Firefox/bug user.

Your support is highly valued!

Now back to my website!

Chris

#9 Danny

Danny

    Is Awesome!

  • Moderators
  • 16555 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 26 November 2012 - 11:19 AM

The topic was marked as resolved.





Also tagged with one or more of these keywords: Resolved