How to center the comments-link under each entry?

  • Unknown's avatar

    I’ve tried to center the link under each entry that leads to my comments, but I can’t seem to get it to work even though it seems to work with “posted by” and “filed to”, any idea what I’m doing wrong?

    This is what it looks like now:

    .commentslink{
    padding-left:0px;
    text-align:center;
    }

    I’ve added this to my stylesheet editor but nothing is happening.

    My blog: http://miira.wordpress.com

    Thank you!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Add this to your “.commentslink” selector:

    display: block;

    and remove this:

    padding-left:0;

    So the whole thing should read like this:

    .commentslink {
    background:url('./images/comments.gif') no-repeat 0 3px;
    text-align:center;
    display: block;
    text-transform:uppercase;
    }

    That should do it.

    BTW, it seems that you copied the whole CSS in the CSS Editor. That’s not recommended because you’re duplicating code that has been written for you already…

  • Unknown's avatar

    PS. You have some really nice pictures. The B/W and low-key ones are great!

  • Unknown's avatar

    Thank you, it’s nice to hear that you like my pictures!

    And thanks for the help too, it works now.
    But no, I’ve made sure I didn’t copy the whole CSS in the CSS Editor. I’ve made alot of changes though, maybe that’s why it looks like I’ve copied the whole thing?

  • Unknown's avatar

    By the way, the icon is still not centered, I guess there is still some kind of mistake somewhere?

  • Unknown's avatar

    Sorry I overlooked the icon, I will give you the code as soon as I can.

  • Unknown's avatar

    Thanks for the help.

    And while I’m on it, what part of the CSS do I edit if I want to change the font that’s around the comment-box? The text that says “skriv et svar”, “notify me with new posts via e-mail” and “notify me of follow-up comments via email”.

  • Unknown's avatar

    Replace your current “.commentslink” definition with this one:

    .commentslink {
    	display: block;
    	margin: auto;
    	padding-left: 20px;
    	text-transform:uppercase;
    	width:80px;
    }

    That should do it.

  • Unknown's avatar

    For the “skriv et svar” use this selector:

    #respond h3 {...}

    For the “notify me with new posts via e-mail” and “notify me of follow-up comments via email”, assuming they both will have the same properties, use these:

    #subscribe-label, #subscribe-blog-label {...}
  • The topic ‘How to center the comments-link under each entry?’ is closed to new replies.