Changing heading tags size in one oage only

Discussion in 'CSS' started by sam132, Mar 4, 2011.

  1. #1
    Hi everyone,

    I am trying to change the size of my heading tags, in one of my pages, I'm using wordpress and I can't size a font resize, I know how to change the size of the heading tags across the whole site, but in terms of one page, is this as simply as simply adding a font size tag?

    Many thanks,

    Sam
     
    sam132, Mar 4, 2011 IP
  2. AtSeaDesign

    AtSeaDesign Active Member

    Messages:
    172
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    93
    #2
    I can't give the exact reasons or buzzwords but are you referring to <h1>, <h2>, etc?

    Implementing styles on those tags will overrule any class applied styles. (If that makes sense.)

    
    <h1 class="blah">
    
    Code (markup):
    shouldn't have styles applied via the blah class because of css rules. (I'm sure someone can provide specifics.)

    I do believe if you added an id for a heading tag on your page it should apply to that page only.

    Now that I think about it I'm not sure about the class thing without actually testing but I believe the ID should work.

    Oh man I may be way off base with this. :)
     
    AtSeaDesign, Mar 4, 2011 IP
  3. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #3
    If you have an URL, share with us to give you something specific or post the most relavant codes you think.
     
    radiant_luv, Mar 4, 2011 IP
  4. qazu

    qazu Well-Known Member

    Messages:
    1,834
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #4
    Wordpress hey? Well that makes it a little complicated. Normally you would use an inline CSS tag as AtSeaDesign suggests but wordpress uses a template for layout. So you'll need to edit the template to add a conditional tag. Something like
    <?php
    if (is_page('7') ) { ?>
    Your header with the special style 
    <?php } else  { ?>
    Your normal header 
    <?php } ?>
    
    Code (markup):
    These links might explain things better:
    http://codex.wordpress.org/Conditional_Tags
    http://www.w3schools.com/php/php_if_else.asp
     
    qazu, Mar 5, 2011 IP