Changing the default link formatting

From KompoZer

Jump to: navigation, search

Open the CSS Editor (F11) and set up a new style rule by clicking on the little color palette above on the left. Type in a and confirm with the "Create Style rule" button. Change the relevant settings e.g. at the Text tab (check "none" at "Text decoration" if you want no underlined link). These settings will apply to all links within this page. Then create another style rule named a:visited (no spaces inbetween!) and confirm. Set up the properties of the links that has been visited (purple + underlined by default). Create a third rule a:hover and define the attributes the link's supposed to apply, when the mouse pointer is put on it. You also can define rules for links in 'normal' state (not clicked, not rollovered) a:link (blue + underlined by default) and when they are just clicked on a:active (red + underlined by default).


  • You can define as many of the four resp. five abovementioned link states as you want, but a:link and a:visited have to stand before/above a:hover and a:active. If necessary use the arrow keys above in the CSS editor on the right to rule order.

  • If you don't want to apply one style for all links on the page you can define classes.
Rename an existing style rule (third button in the CSS editor toolbar) or add a new one like this: a.classname:hover. You can use any name for the class, but avoid special characters (except for - and _) or spaces and make sure the first char is a letter.
To refer a class to a certain link click on it (in WYSIWYG view), rightclick in the status bar on the <a>, go to the Classes entry and choose the wanted class.
Personal tools