WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Text Wrap around Images (4 posts)

  1. Harvey
    Member
    Posted 7 years ago #

    Hello,

    In one of the themes I use, when I place an image and text in a post, the text will not appear under the image, but instead will be aligned to the right of the image and wrap round.

    You can see what I'm trying to explain here...
    http://www.japannewbie.com/japanese_ads/2007/01/13/ntt-can-herupu-yuu/

    Does anyone know how I could instead make the text begin below the image?

    I guess there is something in the css aligning the images to the left maybe?

    Not sure how I would go about adjusting this, any help appreciated!

    - Harvey

  2. citeewurkor
    Member
    Posted 7 years ago #

    You could ad an inline style to your first paragraph like so:
    <p style="clear: left">text here</p>
    That should move the text down below the image.

  3. Harvey
    Member
    Posted 7 years ago #

    citeewurkor, that works great thanks!

    could I use this same thing inside of a Header tag? <H3>

  4. citeewurkor
    Member
    Posted 7 years ago #

    Yes, you can use it with an <h3> tag.

    Be aware that using inline styles is deprecated in XHTML strict, which is what your site is.
    To keep your code valid, I would simply add a class to your stylesheet. For example, in your stylesheet you could add this:
    .clearleft {
    clear: left;
    }

    And then when you want your paragraph or whatever to only appear when all elements to it's left are clear type in the following (using paragraph as example):
    <p class="clearleft">your text here</p>
    Since you have this class defined, you can use it wherever you need something to have the "clear: left;" property.
    An <h3> tag would look like this:
    <h3 class="clearleft">something here</h3>

    This will keep your code valid XHTML strict.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags