WordPress.org

Ready to get started?Download WordPress

Forums

CSS help needed with post footer (4 posts)

  1. lbrean
    Member
    Posted 7 years ago #

    I don't really know much about CSS or webdesign at all, really. On my blog at debtor -rights I've attempted to put the "posted by" author tag next to the "comments" tag in the post footer, but the author name is preceeded by a little .gif which I'm hoping to get rid of in front of the author name (but keep in front of the comments link). It appears to me that the little .gif is being called up from the css template. I've included what I believe is the relevant code from the theme index.php file and the theme css template. Any help would be greatly apprciated!

    From the index.php:

    <div class="postFooter">
    <?php comments_popup_link('Comment', 'Comments', 'Comments'); ?>
    <?php if (get_the_author_url()) { ?>"><?php the_author(); ?><?php } else { the_author(); } ?>
    </div>
    </div>

    From the CSS:

    .post .postFooter {
    float:right;
    width:538px;
    height:73px;
    background:url(images/bg-post-b.gif) no-repeat bottom;
    }

    .post .postFooter a {
    float:right;
    font-size:11px;
    margin:20px 33px 0 0;
    padding:5px 0 5px 21px;
    color:#669933;
    background:url(images/ico-comm.gif) no-repeat left;
    }

  2. Bodhipaksa
    Member
    Posted 7 years ago #

    Delete or comment out the whole of the line(s) beginning:

    background:url

    to comment it out (handy if you're not sure what you're doing, precede the line with /* and follow it with */

  3. moshu
    Member
    Posted 7 years ago #

    That won't really help - since the OP does want to keep the bg image for the comments but not for the author.
    However, as it is now, both being in the postFooter div - the CSS rule applies to both.
    The only way I can see it to be solved:
    1. change the postFooter a CSS: remove the bg image (ico-comm); make the div display: block; text-align: center;
    2. create to new divs inside, one floated left (for the author), one to the right - for the comments;
    3. apply the ico-comm bg only to the links (a) inside the div where the comments are placed

  4. Bodhipaksa
    Member
    Posted 7 years ago #

    Sorry -- didn't read carefully enough! My bad.

    Wouldn't it work to put the author code inside a span of a certain class (<span="nobg"></span> for example and to define that class as

    span.nobg a{background-image: none;}

    in the style sheet? If that style rule comes after the postfooter rule in the stylesheet then it'll gain precedence.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags