Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-24 04:22:23

KB
Member
Registered: 2006-03-13
Posts: 21

Change color of links in a list

Hello everyone,
The links in the different lists included i the sidebars are red by default. How can I change them to another color?
Many thanks.

Offline

#2 2006-03-24 08:14:19

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: Change color of links in a list

Just edit your CSS !
(this post should be in “Layout and CSS” forum)

If you give us a link to your site we would show you how to on such an easy point… (do you use the default layout and CSS ?)

But you’ll need to learn a bit about CSS to go further.

Last edited by Niconemo (2006-03-24 08:15:19)


Nico

Offline

#3 2006-03-24 23:23:01

Jeff_K
Archived Plugin Author
From: Vancouver, British Columbia
Registered: 2005-08-19
Posts: 202
Website

Re: Change color of links in a list

in your css document:

a:link, a:visited { color: #XXXXXX; }
a:hover { color: #XXXXXX; }

or

li a:link, li a:visted { color: #XXXXXX; }

where XXXXXX is the HEX colour that you want to specify.

try searching <a href=“http://www.w3schools.com/css/default.asp”>http://www.w3schools.com/css/default.asp</a>.

Offline

#4 2006-03-25 01:17:44

KB
Member
Registered: 2006-03-13
Posts: 21

Re: Change color of links in a list

My site is <a href=“http://www.vassar.info/b/tp/”>here</a>. As you can see the hyperlinks in the text are underlined with blue. My goal is to change the color of the links in the right sidebar from red to blue. Those links are determined by textpattern and I don’t see how I can use the css for this change.

Once again, your replies are much appreciated.

Offline

#5 2006-03-25 03:47:53

whatbrick
Member
From: Texas
Registered: 2006-03-13
Posts: 100

Re: Change color of links in a list

Trust them when they recommend CSS. That’s what it’s there for. Textpattern may generate the links, but it generates regular HTML, which is affected by CSS.

For the links on the side, throw this into the CSS file:

#sidebar-2 p a {
color: blue;
}

#sidebar-2 p a:hover {
color: red;
}

The first declaration of #sidebar-2 p a sets the initial link color. The second one with #sidebar-2 p a:hover will set the mouse-over color. You can add other style declarations to either one of those to make them look how you want.

Last edited by whatbrick (2006-03-25 03:48:24)


Do not taunt the Markup Monkey!

Offline

#6 2006-03-25 18:26:22

KB
Member
Registered: 2006-03-13
Posts: 21

Re: Change color of links in a list

Thank you all, it does work with css!

Offline

Board footer

Powered by FluxBB