Creating a new font class

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

  1. #1
    Hi everyone,

    I am pretty new to CSS, but I am learning!

    I'm trying to increase the text size of a online link.

    Is there a way I can write a line in my stylesheet, and then I can surrond that one line of text on my page with a certain tag and the size will change (as set in the stylesheet).

    Please help me if you can.

    Please note:

    1)
    The text I am trying to change is a link.

    2)
    I only want to change one link, not all of them!

    3)
    I am a newb so your gonna have to write the line for me to put into my stylesheet!

    4)
    I am using Wordpress


    Many thanks everyone!

    Sam
     
    sam132, Mar 15, 2011 IP
  2. qazu

    qazu Well-Known Member

    Messages:
    1,834
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #2
    qazu, Mar 15, 2011 IP
  3. Insight

    Insight Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi sam132, I was once in your shoes. So here is what you should do (assuming your link text, which is called anchor text reads "tutorial"), your html markup should look like this:
    <a class="bigger">tutorial</a>. Then your CSS declaration should look like this:

    a.bigger {
    font-size: 120%;
    }

    That's it.
     
    Insight, Mar 15, 2011 IP
  4. josephgriffin

    josephgriffin Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If you want only one you can use

    <a style="font-size:150%">Your link</a>
     
    josephgriffin, Mar 16, 2011 IP
  5. leva86

    leva86 Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you can increase the size using style="font-size:18px" or style="font-size:2em" or style="font-size:150%". Try px, em, %.
     
    leva86, Mar 17, 2011 IP
  6. zerophean

    zerophean Peon

    Messages:
    91
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    if you using wordpress try this one :

    1. go to wp-admin
    2. go to editor under themes menu on left panel.
    3. click / select stylesheet (style.css) on right.
    4. at bottom at this code :

    
    a.mylinkbigger{font-size:18px !important;}
    
    Code (markup):
    then click update.
     
    zerophean, Mar 18, 2011 IP