User specified link styles

, , , ,

A commom question in the newsgroups is: "Why is the link/visited link color in I set in 'My Link Style...' (see the Page Style preferences) ignored on most pages?" The same question can be asked about your choice for 'strike through' and/or 'underline'.

The link style is the base style you choose for links, always to be overriden by author styling when you allow author styling. So if the page sets a color for links and visited links (using a stylesheet or html attributes), Opera's settings will be ignored. And if the page stylesheet sets a value for 'text-decoration' (underline, no underline, strike-through, blink), Opera's setting for undeline and strike-though will be ignored.

If you want your preferred link style to be applied all the time, you need to use a 'User style sheet' and use the '!important' marker in it to make your styles override all author styles.

Example of such an user style sheet, just copy to a plain text file:

a:link { color: #0000ff !important; background-color: #ffffff !important; text-decoration: underline !important; } a:visited { color: #ff00ff !important; background-color: #ffffff !important; text-decoration: line-through !important; }

To see your user stylesheet applied on top of author styling, enable it in the 'Author' presentation mode, like this:

http://people.opera.com/rijk/opera/img/presmodes.png

But having you own link colors applied all the time is usually very ugly when visiting sites with a dark background.

Personally I'd use only this in my user stylesheet:

a:visited { text-decoration: line-through !important; }

... because it never interferes with the color scheme of sites.

Multiple variables for search queriesPanelizer for Opera and Firefox, with offline CSS 2.1 reference

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.