Results 1 to 2 of 2

Thread: A minor problem with styling my links

  1. #1
    Join Date
    Jan 2008

    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!


  2. #2
    Join Date
    Jan 2006
    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
    #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
    Registered Linux User #445070
    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