• Hello,

    maybe i’m thick, but i cannot get how to style the text of a post.

    let me explain myself:

    I have
    <?php the_content(‘Read Full Article’); ?>

    which generates (i’m using Simple Image Size plugin) the following:

    <p><img class=”alignleft size-single-post-thumbnail wp-image-75″ title=”IDL TIFF ” src=”http://localhost/bibop/assets/PIA01907-1280×800-630×400.jpg&#8221; alt=”” width=”630″ height=”400″ />MY TEXT HERE MY TEXT HERE</p>

    Now, this is fine, but I cannot style the text without affecting the image… is tehre a way to automatically wrap the text in a div so that i can easily style it?

    Alex

Viewing 1 replies (of 1 total)
  • In the post editor, click on the HTML tag and you should see basically what you posted above. Immediately either side of the text add <span> tags with a class defined. Then you can create that class in your CSS file.

    EG: ...height="400" />MY TEXT HERE MY TEXT HERE</p> would become: ...height="400" /><span class="myclass">MY TEXT HERE MY TEXT HERE</span></p>

    Hope that helps

    Peter

Viewing 1 replies (of 1 total)
  • The topic ‘add div to a text in a post’ is closed to new replies.