Jump to content


Photo
- - - - -

Customising h1


Best Answer Danny , 13 November 2013 - 11:13 AM

Hi,

 

If you want to override the default styling effecting a header 1 tag when its used as a link, you will need to use the following:

 

h1 a { }

 

Add your custom styling there, such as color, text decoration and so forth.

Go to the full post


  • Please log in to reply
7 replies to this topic

#1 keithmagvacom

keithmagvacom

    Advocate

  • Members



  • 354 posts
  • Framework Version:2.4
  • Country: Country Flag

Posted 12 November 2013 - 08:11 PM

Hi Folks

 

I am trying to customise the h1 font settings on my site

Please Login or Register to see this Hidden Content

 

What I have at the moment is a custom font defined in the css:

Please Login or Register to see this Hidden Content

In the text of the page this is called by:

Please Login or Register to see this Hidden Content

What I want to do is change this to the h1 and have tried:

Please Login or Register to see this Hidden Content

which works, however the color of the font changes to the hyper link color which I what to avoid. In the .meltilte version the font color remains the same and on hover the underline appears. This is what I'd ideally like to achieve.

 

I would also like to remove some of the space between the title and the paragraph of text but cannot figure that one out. 

 

My reason for wanting to define the h1 is for SEO reasons. I don't have h1 on the site and I believe they help with SEO...

 

Any assistance would be appreciated. 

 

Thanks 

Keith



#2 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 13 November 2013 - 12:34 AM

Hi Keith

 

I'm not sure i understand the question 100%, you're looking to change that text to be h1? If that's what you mean put the text in <h1> tags.

 

<h1>Design + Letterpress</h1>

 

The spacing is coming from the P tag assigned to span.

 

.span5 p {

    margin: 0; }


#3 keithmagvacom

keithmagvacom

    Advocate

  • Members



  • 354 posts
  • Framework Version:2.4
  • Country: Country Flag

Posted 13 November 2013 - 07:56 AM

Hi James

 

Thanks, but no. What I am after is to change the font that is currently assigned to the h1 tags. The meltitle that I have defined is exactly what I want, but when I put the h1 tag in as I have it defined in the css and given that it has a URL attached it changes the color to the link color. I want the color to remain as #925c21. 

 

The spacing the P tag, will be changed for all .span5 on the site. Is it possible to only have it affect one particular page row span section?

 

Thanks



#4 Danny

Danny

    Is Awesome!

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

Posted 13 November 2013 - 11:13 AM   Best Answer

Hi,

 

If you want to override the default styling effecting a header 1 tag when its used as a link, you will need to use the following:

 

h1 a { }

 

Add your custom styling there, such as color, text decoration and so forth.


  • keithmagvacom likes this

#5 keithmagvacom

keithmagvacom

    Advocate

  • Members



  • 354 posts
  • Framework Version:2.4
  • Country: Country Flag

Posted 13 November 2013 - 02:43 PM

Perfect Danny.

 

That worked. On the second question is it possible of the p tag in the span is it possible to have this apply to only one span? Is there a way to define a particular row/span that can then be styled with CSS.

 

Thanks



#6 Danny

Danny

    Is Awesome!

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

Posted 13 November 2013 - 02:50 PM

You can add a custom class to the <div> that has span5 in for example:

 

<div class="span5 my-custom-class">

 

You can then add styling to this custom class.


  • keithmagvacom likes this

#7 keithmagvacom

keithmagvacom

    Advocate

  • Members



  • 354 posts
  • Framework Version:2.4
  • Country: Country Flag

Posted 13 November 2013 - 03:00 PM

Thanks Danny. Appreciate your help and tuition. 



#8 Danny

Danny

    Is Awesome!

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

Posted 13 November 2013 - 03:05 PM

No problem.