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

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2003-01-09 - MattWilkie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.