WordPress.org

Support

Support » Themes and Templates » Gravatars – need to position correctly with CSS

Gravatars – need to position correctly with CSS

Viewing 1 replies (of 1 total)
  • I fixed it myself by adding an extra <div> tag before the gravatar img tag. I called this tag “cd”…
    And here is an sample of my CSS file that aligns the gravatar to the right.
    .cd
    {
    float: right;
    text-align: center;
    color: black;
    border-width: 0 0 1px 1px;
    padding: 0 0 5px 5px;
    margin: -1px -1px 0px 5px;
    position: relative;
    border-color: #F93;
    border-style: solid;
    background-color: white;
    height: 1%;
    width: 1%;
    }
    /*
    This is a CSS comment where the end-of-comment marker is escaped. The following styles are not read by Explorer 5 Mac because it thinks they are still part of this comment.
    */
    .cd
    {
    height: auto;
    width: auto;
    }
    /*
    Another comment, now with a normal end-of-comment marker. Explorer sees the end of this comment as the end of the previous one.
    */

    Actually, it does do more than just aligning the img tag, so adjust it to you needs. You can see the rendering on my website.

    Don’t forget to close your div tag as well…

Viewing 1 replies (of 1 total)
  • The topic ‘Gravatars – need to position correctly with CSS’ is closed to new replies.
Skip to toolbar