What is the code to do this???

9 replies
OK, I have a code in Wordpress to put an Adsense ad under each post.
What I want is to add another block, but so they are side to side.

No matter what I am doing at the moment, the blocks are going on top of each other - what is the code to stack them side by side?
#code
  • Profile picture of the author johnnyN
    would need to see the code, and the html.
    {{ DiscussionBoard.errors[4573735].message }}
  • Profile picture of the author jefftardif
    <div style="float:left;">First AdSense Code</div><div>Second AdSense Code</div>
    {{ DiscussionBoard.errors[4574423].message }}
    • Profile picture of the author vinug
      Originally Posted by jefftardif View Post

      <div style="float:left;">First AdSense Code</div><div>Second AdSense Code</div>
      i think the entire code above can be put inside a <div>{above code here}</div>
      It should work fine.
      {{ DiscussionBoard.errors[4575182].message }}
  • Profile picture of the author RokDot
    All you need is Div's. Easiest way of doing it.
    Just google "Div tables" and it'll all come up.
    Html is a lot easier than it looks.
    {{ DiscussionBoard.errors[4574985].message }}
  • Profile picture of the author david5000
    Are you using CSS to control the Divs ?

    Try floating the second DIV to the left as well. If that doesn't work then add a padding of 350px to the second div

    I'm not at my normal PC so i can't do the code up for you.
    {{ DiscussionBoard.errors[4575007].message }}
  • Profile picture of the author david5000
    Also just had the idea.. but both adsense code in the same DIV.
    {{ DiscussionBoard.errors[4575019].message }}
  • Profile picture of the author NickBhakta
    What I would do for consistency is place each Adsense block in its own <div> tags. This way if you want to customize each block differently, you can do so with css. I would also float each <div> block to the left. Like this:

    <div float="left">Adsense Code Block 1</div>
    <div float="left">Adsense Code Block 1</div>
    {{ DiscussionBoard.errors[4590924].message }}

Trending Topics