Support » Themes and Templates » CSS help needed with post footer

  • 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(); } ?>

    From the CSS:

    .post .postFooter {
    background:url(images/bg-post-b.gif) no-repeat bottom;

    .post .postFooter a {
    margin:20px 33px 0 0;
    padding:5px 0 5px 21px;
    background:url(images/ico-comm.gif) no-repeat left;

Viewing 3 replies - 1 through 3 (of 3 total)
  • Delete or comment out the whole of the line(s) beginning:


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

    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

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSS help needed with post footer’ is closed to new replies.