WordPress.org

Support

Support » Plugins and Hacks » Contextual Related Posts » [Resolved] CSS style not working on Home page

[Resolved] CSS style not working on Home page

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ajay

    @ajay

    Can you post your CSS code here?
    On the Home and other Other archive pages, the plugin uses a class instead of an ID, so you’ll need to style .crp_related

    same problem:

    The CSS styling only works on the post.

    When home page is selected, it uses default styling on the home and custon css on the posts.

    my site is here:

    http://www.currentinspiration.com/my-blog-daily-dose-of-inspriation/

    I am using this code from your sticky:

    #crp_related ul {
    list-style: none;
    float: left;
    margin: 0;
    }
    #crp_related li, #crp_related a {
    float: left;
    overflow: hidden;
    position: relative;
    text-align: center;
    }
    #crp_related li {
    margin: .9em;
    border: 1px solid #ddd;
    padding: 6px;
    }
    #crp_related li:hover {
    background: #eee;
    border-color: #bbb;
    }
    #crp_related a {
    width: 150px;
    height: 150px;
    }
    #crp_related a:hover {
    text-decoration: none;
    }
    #crp_related img {
    max-width: 150px;
    margin: auto;
    }
    #crp_related .crp_title {
    position: absolute;
    height: inherit;
    bottom: 6px;
    left: 6px;
    padding: 3px;
    width: 144px; /* = 150px – (3px * 2) */
    color: #fff;
    font-size: .9em;
    text-shadow: #000 .1em .1em .2em;
    background: rgb(0.5, 0.5, 0.5);
    background: rgba(0, 0, 0, 0.5);
    }
    #crp_related li:hover .crp_title {
    background: rgb(0.2, 0.2, 0.2);
    background: rgba(0, 0, 0, 0.8);
    }

    Plugin Author Ajay

    @ajay

    For the homepage you need to use .crp_related instead of #crp_related

    You need to use a double declaration like this:

    #crp_related ul, .crp_related ul {

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] CSS style not working on Home page’ is closed to new replies.
Skip to toolbar