SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2014
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Why I can't stylize H1 and H2 headings?

    I need help with setting style for H1 and H2 tags through Custom CSS located in my inFocus WordPress theme I use.

    The problem concerns H1, H2 and maybe other headings. I can’t style them and don’t know what to do because there’s something called Cufon that seems to take over. I once read about it and it is JavaScript of some kind for fonts display... No idea why fonts could not do without it.

    Disabling Cufon sitewide is last resort which I pretty much hesitate to do and want to know how to take control over from Cufon or what ever that control headings.

    Here’s coding for heading I fail to stylize:

    <h1 style="opacity: 1;"><font color="#1C1C1C"><cufon style="width: 162px; height: 34px;" alt="Infrared " class="cufon cufon-canvas"><canvas style="width: 189px; height: 36px; top: -1px; left: -1px;" height="36" width="189"></canvas><cufontext>Infrared </cufontext></cufon><cufon style="width: 156px; height: 34px;" alt="Thermal " class="cufon cufon-canvas"><canvas style="width: 183px; height: 36px; top: -1px; left: -1px;" height="36" width="183"></canvas><cufontext>Thermal </cufontext></cufon></font></h1>
    H1 has “Infrared Thermal” words and as you can see, each word has same repeating code (which by the way raises question if same code could be placed once to do the job for all words in heading instead being redundant).

    Can you advice what to do? I spent a few hours fiddling to no avail. At least I found that this concerns headings only...

    The style I want to implement is done through custom CSS file that theme offers. I can seem to set style for <p> tags but not headings specifically.

    Thanks.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,301
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by TechnicGeek View Post
    Disabling Cufon sitewide is last resort which I pretty much hesitate to do
    Hesitate no more! Cufon is an inacessible, unnecessary, dead technology—one that has happily jumped right into the waste basket of history ... along with <font> tags and inline styling. It has been replaced by the much better era of web fonts.

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2014
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Hesitate no more! Cufon is an inacessible, unnecessary, dead technology—one that has happily jumped right into the waste basket of history ... along with <font> tags and inline styling. It has been replaced by the much better era of web fonts.
    The problem is that disabling it could have crashing effect on website operation until resolved. At least it is how I read it but I might be wrong. I just don't want to use that option and just be able to take control of changing headers on website.

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,494
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Disabling Cufon sitewide is last resort which I pretty much hesitate to do and want to know how to take control over from Cufon or what ever that control headings.
    It can't be done with css because cufon uses js to remove the html for the elements that you are trying to style and replaces them with its own code for the custom fonts. The css therefore has nothing to target as such.

    You'd need to dig into the cufon js to stop it styling the elements you require.

    As Ralph said @font-face is a better alternative these days.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •