Forums

[resolved] Alignment of text and images (4 posts)

  1. caughtredhanded
    Member
    Posted 2 years ago #

    At the beginning of each post I have set up an author description box, pulling details of the post author and their biography description and what have you. Only problem is, when I try to float the Gravatar image so that the text sits to its left, the text seems to appear below it, irrespective of my "float: left" tag in my stylesheet.

    I presume that it is being overridden by something else, but I can't for the life of me work it out. Is it as simple as that, or am I missing something fundamental?

    Blog is here.

    Thanks!

  2. flamenco
    Member
    Posted 2 years ago #

    Hi,
    I think I see what's going on. You had the right idea, totally. But an H4 heading is like a solid block, and will not readily "float around". I got it to wrap pretty well by adding display: inline like so:

    .postauthor h4 {
      display:inline;
      font-size:1.2em;
      margin:0 0 10px;
    }

    Cheers, Dave

  3. Harrison O.
    Member
    Posted 2 years ago #

    And the reason you are having this problem it's because you have clear:both for your heading tags on your compressed.css file.

    h1, h2, h3, h4, h5, h6 {
    clear:both;
    color:#111111;
    font-family:HelveticaNeue,Arial,Lucida Grande,Verdana,sans-serif;
    }

    By removing the "clear:both" will also fix the problem.

  4. caughtredhanded
    Member
    Posted 2 years ago #

    Cheers guys, all sorted now, thanks to you!

Topic Closed

This topic has been closed to new replies.

About this Topic