Styling the hyperlink [solved]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Styling the hyperlink [solved]

Post by Gregor »

I'm looking on where to change the color of the hyperlink. Checking the link in Yslow, I see that it is set in "about:PreferenceStyleSheet". It has the following code:

Code: Select all

noscript  {
display:none !important;
}
*|*:-moz-any-link {
text-decoration:underline;
}
*|*:-moz-any-link:active {
color:#EE0000;
}
*|*:visited {
color:#551A8B;
}
*|*:link {
color:#0000EE;
}
Any idea where I can change the color? Changing it in the site's css does not work www.uisge-beatha.eu

Gregor
Last edited by Gregor on Thu Jun 03, 2010 1:24 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Styling the hyperlink

Post by Rolf »

Hi Gregor

It looks like there is no styling of the normal content in your stylesheets.
I do find:
.NewsSummary a:link, .NewsSummary a:visited, .NewsSummary a:hover, .NewsSummary a:active
Here you can style the news

In the layout stylesheet you should have (or add) something like this, to style the default :

Code: Select all

a {
	color: #679EBC;
	text-decoration: none;
	text-align: left;
}
a:hover {
	color: #3A6B85;
}
a:active {
	color: #3A6B85;
}
a:visited {
	color: #679EBC;
}
Grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Peciura

Re: Styling the hyperlink

Post by Peciura »

You should be able to change link colors

Code: Select all

div#main a, div#rightcontent a, div#main a:visited, div#rightcontent a:visited, div#main a:hover, div#rightcontent a:hover{
color: #000;
}
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: Styling the hyperlink

Post by Gregor »

Thanks for you replies so far!

@Rolf: if I put your suggestion into the css, the links do change but also left and right side of the screen. But it does work :)

I saw in the css:

Code: Select all

/*default link styles, set all links to have underline and bluish color 
a,
a:link, a:active, a:visited {
   text-decoration: underline;
/* 
css validation will give a warning if color is set without background color. this will explicitly tell this element to inherit bg colour from parent element 
*/
   background-color: inherit; 
   color: #00FF00; 
}
*/


/*
a:visited {
   text-decoration: underline;
   background-color: inherit;
   color: #18507C;                /* a different color can be used for visited links */
}
*/

/* remove underline on hover and change color */
a:hover {
   text-decoration: none;
}
Changing the 'color: #00FF00;' does not make any difference, so I was confused to see that a total different styling was pickup from a stylesheet I'm not familiar with (first post). For some reason, the current code in my css does not work ???

Gregor
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Styling the hyperlink

Post by Rolf »

Gregor
This should be the part where you style your
But if the styling is there twice somehow, there will be a conflict and you won't get any changes on the site.
You can PM me a temp. admin login and I will take a look.
Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Styling the hyperlink

Post by Rolf »

Hey Gregor,

In the layout stylesheet (just before the styling part) was a comment end tag missing */
Therefore this styling part wasn't active... and had changing it no output on the website...

Grtz. Rolf  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “Layout and Design (CSS & HTML)”