Wordpress, Links and css

by kah22
1 replies
  • WEB DESIGN
  • |
Can someone help with a bit of css coding?

At the moment I'm using the BranfordMagazine Theme and it fits in beautiful for what I want; with one exception - the links.

The links are called as usual in the style sheet, here's how the look:
Code:
a:link, a:visited {
	color: #333;
	text-decoration:none
	}

a:hover, a:active {
	color:#333;
	text-decoration:underline;
	}
Unfortunately the colour of the main text has also been set at #333 and as you can imagine when you create a link within a post e.g. to an affiliate program it appears as just ordinary type and unless the visitor hovers over the actual link they have no way of knowing there is one there.

What I'm trying to do is overwrite the command in the style sheet on a post by post basis so as I can have links within the post a different colour from those in the stylesheet. I understand it can be done by using css but I'm not really into coding. I've hacked the following from bits and pieces I've seen in tutorials - but I don't really understand what to do.

In header.php I've created a class called '.hyper' it looks like this
Code:
.hyper 
a:link, a:visited {
	color: #0000ff;
	text-decoration:none
	}

a:hover, a:active {
	color:#0000ff;
	text-decoration:underline;
	}
So let's say I was writing the following: "for IM advice and help Warriors Forum is the place to go,' and I wanted to hyper link the words Warrior Forum in colour blue as above and pointing to the WF Home Page, what's the actual coding I'd use?

For non programers like myself a plugin would be ideal but I've hunted around for one and there dosen't seem to be one out there

You might suggest it would be better just to make all the links blue and that is very easily done but I would prefer to have the links in the sidebar remain as they are, it is visible more appealing.

Glad of any help

Kevin
#css #links #wordpress
  • Profile picture of the author LADWebDesign
    Are you asking how to make the links in the sidebar area a different color than the links in the main content area? If so, you need to create a new div in the css such as:

    .mainlink
    a:link, a:visited {
    color: #0000ff;
    text-decoration:none
    }

    a:hover, a:active {
    color:#0000ff;
    text-decoration:underline;
    }

    Change the colors to suit your taste. Save the css file, then open up the index.php file - wherever you see the .hyper div call in the main content area, replace it with .mainlink - keep the .hyper div in the sidebar area.

    Linda
    {{ DiscussionBoard.errors[476369].message }}

Trending Topics