Need A Little Wordpress Html Help

3 replies
  • WEB DESIGN
  • |
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
#html #wordpress
  • Profile picture of the author Susan Hope
    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
    Signature
    One-to-One WordPress Coaching Service Available at Low Hourly Rate - Let the frustration end now! WordPress Installs, Theme Design, Site Tweaks & other WordPress services available
    Find me on Pinterest: PINTEREST
    {{ DiscussionBoard.errors[1272949].message }}
  • Profile picture of the author promo_guy
    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
    {{ DiscussionBoard.errors[1277635].message }}
  • Profile picture of the author SimonFairbairn
    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
    {{ DiscussionBoard.errors[1278190].message }}

Trending Topics