CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: CSS Style-sheet

  1. #1
    Join Date
    Mar 2000
    Posts
    196

    CSS Style-sheet

    Hello

    I've already a style-sheet and included among other things a tag for the links:
    a:link { font-family: arial, helvetica, sans-serif; font-size: 10pt; text-decoration: none; color: #990066; }

    Now I'd like another link with a font size of 8pt only. Is there a possibility to add an additional tag in the same css like:
    a:link2........

    Or does someone have another solution for that???

  2. #2
    Join Date
    Aug 2002
    Location
    Reykjavik, Iceland
    Posts
    201
    Of course. You are not using the full power of CSS.

    Give the specific link a CSS class:

    <a href="foo.jsp" class="smallfont">my page</a>

    Now add the class definition to the style sheet:

    a.smallfont:link { font-family: arial, helvetica, sans-serif; font-size: 8pt; text-decoration: none; color: #990066; }

    Last edited by websmith99; January 6th, 2003 at 10:31 AM.

  3. #3
    Join Date
    Mar 2000
    Posts
    196
    That works !! I didn't know that function

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured