Tags:
create new tag
, view all tags

Question

[relocated here from TextFormattingFAQ]

How can I give a CSS CLASS to a link, for better text formatting? I allready using the CSS files for TWiki, but not yet able to give CLASS attribute to purticular link tag.

-- SandeshKaralkar - 1 Jan 2003

  • TWiki version:
  • Perl version:
  • Web server & version:
  • Server OS:
  • Web browser & version:
  • Client OS:

Answer

The short answer is that you can't.

The yucky answer is that you can by manually specifying the link, e.g. <a href="WikiWord" class="superlarge">WikiWord</a>

A different answer is that you can by if the links you want to style always fall within a particular context. For example if you want links within headings to be gray add this rule to your stylesheet:

  h1 a, h2 a, h3, h4 a, h5 a, h6 a {color: gray;}

For more info on this technique see Environmental Style at http://realworldstyle.com/

More CSS info is available at Codev.CssResources

-- MattWilkie - 08 Jan 2003

Topic revision: r2 - 2003-01-09 - MattWilkie
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.