Need A Little Wordpress Html Help

by 3 replies
4
Hi, When I put my adsense ads on the left of a post, and images on the right, how do I stop my text from sneaking up between the two? Is there a code I can put at the bottom of my adsense code, and images, that will prevent my text from going above that point?

I have tried basic stuff like <p> and <br> with no success.

Thanks Glenn
#website design #html #wordpress
  • Glenn not quite sure what you are trying to do - are you saying...

    You are wanting to put, all within the post area, Adsense and images above the textual content of your post, with Adsense and Image next to each other and image on the right?

    Are you using the visual or html side of the wysiwyg editor?

    Can you post a URL to show what you mean? or pm to me if not comfortable posting it?

    Sue
  • Not saying this is the "perfect" solution but, I'd recommend maybe putting your Adsense and image into separate div tags, then add a little padding or margins in CSS and that should solve the problem pretty easily.

    I'm sure there's more than one way to skin a cat in this case but that's what immediately pops into my mind
  • You could wrap your adsense code and image in a div, as promo_guy suggested:

    HTML Code:
    <div class='wrap'>
    <div class='adsense'>Adsense Code</div>
    <img src='...' />
    </div>
    You'll need to edit the CSS file and add this:

    HTML Code:
    div.wrap { width: 100%; overflow: hidden; }
    div.adsense { float: left; }
    div.wrap img { display: block; float: right; }
    You can add some margins and padding to the div.adsense and img CSS declarations if you need to space them around.

    Now, anything that comes after the closing </div> tab will appear below the adsense and image elements.

    I hope that's what you meant! Let me know if you need anything else.

    Si

Next Topics on Trending Feed

  • 4

    Hi, When I put my adsense ads on the left of a post, and images on the right, how do I stop my text from sneaking up between the two? Is there a code I can put at the bottom of my adsense code, and images, that will prevent my text from going above that point? I have tried basic stuff like <p> and <br> with no success.