Results 1 to 2 of 2

Thread: A minor problem with styling my links

  1. #1
    Join Date
    Jan 2008
    Posts
    26

    A minor problem with styling my links

    Im just starting out in the xhtml css world so forgive me for my probably very simple and silly question! but none the less...

    im styling my text links in my site via the <a> tag. But i want the font sizes in two seperate divs to be different. how do i combine the <a> with a specific div so that i can apply different font-sizes?

    any help would be hugely appriciated!

    Mitch

  2. #2
    Join Date
    Jan 2006
    Location
    Michigan
    Posts
    394
    Give your <div>'s an id like this:
    HTML Code:
    <div id="cart"><a>Go shopping</a></div>
    <div id="advertisement"><a>Win something now!</a></div>
    Then, you can use css to style it like this
    Code:
    #cart a{
    color:#00ff00; /* Green Link Text */
    }
    #advertisement a{
    font-size:10em; /* Ridiculously huge link text */
    }
    You can give any element you want an id to uniquely identify it. There's plenty of information available here and on google if you need more help. You might want to research css classes as well; they have a pretty similar purpose but are for a slightly different situation.
    Co-founder Aedis IT www.aedisit.com
    Registered Linux User #445070 counter.li.org
    Zend Certified Engineer - CIW Professional - CompTIA Linux+ - CompTIA Network+

Posting Permissions

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