• 0

css - line breaking text


Question

In the attached screenshot, how can i get the text to be forced under the image.

Should be something simple i've done it before but this is someone elses theme i cant seem to get it to sit correctly.

post-54971-0-66638100-1297800595.png

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

You might want to check the class used on either the image (avatar?) and/or the class used for the member info. Looks like something is left floating which is causing that issue.

Otherwise you can just apply the following to a class on the image. That should force it on it's on line/block.

 display: block;

Link to comment
Share on other sites

  • 0

There isn't really anything wrapped around the text or the avatar i used style="display:block;" on the image and that didn't fix it either.

Maybe stick the text in a div?

Link to comment
Share on other sites

  • 0

You'll have to wrap the text inside a <div> or something and then set a left margin on that <div>:

#next-to-float {
    margin-left: 100px;
}

This margin is necessary to stop the element from wrapping below the image.

There's not really an easy solution to do this without wrapping the text. Perhaps it's possible to set a left padding on the containing element and then offsetting the image to the left, but I think that'd look nasty. I'd say, just go with a wrapper for your text. ;)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.