WordPress.org

Ready to get started?Download WordPress

Forums

Gravatar CSS? (1 post)

  1. fede777
    Member
    Posted 6 years ago #

    Hi, I followed a tutorial to implement Gravatars in my blog without a plugin, and it worked perfect, but, I can't align the image to the text.

    I want it to display exactly as it displays here in the left, the same align and the image to link the author's site.

    Here's how it looks now on my blog:

    http://www.geekspot.com.ar/geekspot/anunciate-gratis-en-geekspot/#comments

    I have no CSS, if needed, for the Gravatar.

    What I do have is this in comments.php

    <?
    $email = $comment->comment_author_email;
    $default = "http://www.geekspot.com.ar/wp-content/themes/minyx2Lite/pix/default_gravatar.png"; // link to your default avatar
    $size = 32; // size in pixels squared
    $rating = "G"; // [G | PG | R | X]
    $grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=
    " . md5($email) . "&default=" . urlencode($default) . "&size=" . $size."&rating=".$rating;
    ?>
    <h5><img src="<?=$grav_url ?>" height="<?=$size ?>" width="<?=$size ?>" alt="User Gravatar" /> <?php comment_author_link() ?><?php _e('','minyx2Lite')?> dijo:</h5>
      <small class="commentmetadata"><?php comment_date('F j, Y') ?> <?php _e('@','minyx2Lite')?> <?php comment_time() ?> <a>" title="">#</a> <?php edit_comment_link('editar','��',''); ?></small></br>

    And the CSS for H5 and small

    ol.commentlist h5{ /*nick*/
    	display:inline;
    	font-size:11px;
    	margin:0;
    	padding:0;
    	}
    ol.commentlist h5 a:hover{
    	border-bottom:1px solid #ccc; color:#185DA0; background-color:inherit;
    	}
    ol.commentlist h5 small{
    	display:inline;
    	}

    Thank you very much.

Topic Closed

This topic has been closed to new replies.

About this Topic