Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] Edit link style in CSS (http://forum.bytesforall.com/showthread.php?t=7353)

louisevarre May 31, 2010 03:18 AM

[SOLVED] Edit link style in CSS
 
Hi,

I want to style my body links in CSS to get the effect of having a think line (1px) underneath the link (different color than text), which then becomes a line of 3px when hovered, again different color than text. I can do this by:

HTML Code:

a {
        border-bottom:1px solid #cccccc;
        padding-bottom: 2px;
}
a:visited {
        color: #09C;
        text-decoration: none;
}
a:hover {
        color: #333333;
        border-bottom:3px solid #AD3417;
        padding-bottom: 2px;
        text-decoration: none;
}
a:active {
        color: #006;
        text-decoration: none;
}
a:link {
        text-decoration: none;

But then ALL links in the webpage change, including page titles, blog titles etc. I ONLY want the links in the text to change. Can anyone please help me?

Thanks

Louise

lmilesw May 31, 2010 05:29 AM

I haven't tested extensively but try adding #middle before the selectors for example
HTML Code:

#middle a
or
HTML Code:

#middle a:visited

louisevarre May 31, 2010 06:01 AM

Thank you Imiles, but no, it does not work.

See artdelamorena.com

I ONLY want the links to be affected that would normally be affected by editing the links in the theme options....

louisevarre May 31, 2010 06:08 AM

Actually, I stand to be corrected. The sidebar links are now back to normal, i.e. not affected by the new css style to the links. Which is not what I wanted, I wanted those to remain the same as the "normal" links.

The problem is that the page menu, and post titles also have the new link css. Not what I want.

The formatting that I had done to the page menu is gone...

Any help much appreciated!

Flynn Jun 1, 2010 11:45 AM

You could try

div.post a:link

... etc. to target links inside posts

louisevarre Jun 1, 2010 01:09 PM

Thank Flynn, but if I understand correctly I would have to add html on each post. This is for a client that already has 1000 + posts, so need something general...

I could probably work around the page menu, by tweaking the css. But what about the page/post title?

juggledad Jun 1, 2010 01:34 PM

Flynn's suggestion is to put that into the CSS inserts and then it would effect all posts

Kmax Apr 30, 2011 11:36 PM

Is there any way to change just the text link style inside a post?

I used
HTML Code:

div.post a:link
but it changed the CSS for the links in the footer area of the post and post comments.

Is there any div that's just for the post text itself and no other links? I worked on this for about an hour last night and poked around online with no luck except for this forum post. My site is www.mybeijingstories.com if it helps.

Any ideas?

Thanks!

juggledad May 1, 2011 04:30 AM

Use 'div.post-bodycopy'

Kmax May 1, 2011 09:31 AM

Thanks! That was just what I was looking for. My site looks even better now :)


All times are GMT -6. The time now is 02:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.