Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alexandru 112 posts 272 karma points
    Oct 11, 2013 @ 11:45
    Alexandru
    0

    Add padding to images of a blog post

    Hello,

    I have this part of the XSLT that renders the content of a blog post:

    <div class="entryContent">
        <xsl:value-of select="$post/bodyText" disable-output-escaping="yes" /> 
    </div>
    

    and I would like to know if it is possible to somehow scan the contents of the post and look for images. I need to add some padding to any image within a post.

    I guess I need to use the stripHTML method somehow?

    Thanks!

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 11, 2013 @ 12:07
    Dennis Aaen
    101

    Hi Alexandru,

    I was just thinking couldnĀ“t you just add padding using pure CSS technology.

    Like this:

    .entryContent img{ 
    padding: 5px;
    }

    /Dennis

  • Alexandru 112 posts 272 karma points
    Oct 11, 2013 @ 12:12
    Alexandru
    0

    hah.... astounding...

    I guess you forget about the simple stuff when you dig too much into it...

    Thanks for waking me up ;)

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 11, 2013 @ 12:23
    Dennis Aaen
    0

    You are very welcome Alexandru, sometimes it can be hard to see the most simple solution as you said :-)

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft