Excluding homepage from link decorations

  • Anonymous

    #5241

    Hey,

    I want to underline and bold all content links in my site. So, I wrote the following code:

    .entry a:link,
    .entry a:hover,
    .entry a:visited {
    font-weight: bold;
    text-decoration: underline;
    }

    This works, but it also affects the post titles and ‘read more’ buttons on the homepage, which I don’t want. Is there a way to exclude the homepage from these decorations?

    Thanks!

    Mod

    Kenneth John Odle

    #31258

    Try changing entry to entry-content

    Anonymous

    #31259

    It works! Thanks!

    Anonymous

    #31260

    Sorry,

    I have a problem doing this. Want links to be bold and underlined.

    My CSS of the child theme:

    Quote:
    /*

    Theme Name: Graphene Child

    Theme URI: http://example.com/

    Description: Child theme for the Graphene theme

    Author: Your name here

    Author URI: http://example.com/about/

    Template: graphene

    Version: 1.0

    */

    @import url(“http://snbchf.com/wp-content/themes/graphene/style.css”);

    /* Your modification goes here */

    .featured_slider #slider_root {

    background: none repeat scroll 0 0 #f0e1d8;

    }

    blockquote {

    background-color: #f5eeeb; }

    {

    h1 {font-weight: bold}

    h2 {font-weight: bold}

    h3 {font-weight: bold}

    h4 {font-weight: bold}

    h5 {font-weight: bold}

    h6 {font-weight: bold}

    }

    {

    .entry-content a:link{

    font-weight: bold;

    text-decoration: underline;

    }

    .entry-content a:hover {

    font-weight: bold;

    text-decoration: underline;

    }

    .entry-content a:visited {

    font-weight: bold;

    text-decoration: underline;

    }}

    Anonymous

    #31261

    @Peter

    There are some unnecessary curly brackets in your child theme stylesheet. Remove them.

    Try replacing the custom css in child theme style.css with this,

    .featured_slider #slider_root {
    background: none repeat scroll 0 0 #f0e1d8;
    }

    blockquote {
    background-color: #f5eeeb;
    }

    h1, h2, h3, h4, h5, h6 {
    font-weight: bold
    }

    .entry-content a, .entry-content a:hover, .entry-content a:visited {
    font-weight: bold;
    text-decoration: underline;
    }

    If it doesn’t make links bold and underline, try adding !important declaration to it. Example,

    .entry-content a, .entry-content a:hover, .entry-content a:visited {
    font-weight: bold !important;
    text-decoration: underline !important;
    }

    Anonymous

    #31262

    It does neither bold nor underline.

    see http://snbchf.com/economic-theory-2/minsky-kindleberger/

    I tried both

    .entry-content a

    and

    .entry-content a:link

    Anonymous

    #31263

    I have solved the problem, but encountered a question:

    Entering the code into the child theme does not work, but entering the custom code into Graphene options worked

    why that ?

    Anonymous

    #31264
    Quote:
    Entering the code into the child theme does not work,..

    Because your browser keeps a copy of cached style.css in your system for future use, so that it doesn’t need to download the same file on each page load. It may be there for a longer time depending on your server/.htaccess settings. Whenever you modify the style.css in your host, you need to clear your browser cache (by pressing Ctrl+F5) in order to get a fresh stylesheet. That’s why you still see the old style even after updating the stylesheet.

    Quote:
    .. but entering the custom code into Graphene options worked

    why that ?..

    That’s because the Custom CSS in Graphene Options embeds the custom CSS withing the page source. The embedded (inline) CSS is not cacheable. So, whenever you refresh the page, you’ll have CSS embedded with the page. So, you’ll notice the changes immediately.

    PS: Try adding !important to style declaration in child theme stylesheet to ignore the latter styles.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!