How to embed adsense into content???

Discussion in 'AdSense' started by cri8bat, Aug 22, 2008.

  1. #1
    Hi all

    just uploaded my new website yornz(dot)com

    but I am getting problems with the adsense code, as you see currently the the ads are on the top and the content down. I am want to the content to be placed along the ads.

    need help
     
    cri8bat, Aug 22, 2008 IP
  2. Fka200

    Fka200 Guest

    Best Answers:
    0
    #2
    <div style="float: left; margin: 3px 3px 3px 3px;"> ADSENSE CODE HERE </div> CONTENT
    Code (markup):
     
    Fka200, Aug 22, 2008 IP
  3. cri8bat

    cri8bat Well-Known Member

    Messages:
    1,459
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    160
    #3
    I done that but its not working :(
     
    cri8bat, Aug 22, 2008 IP
  4. TonyVeigas

    TonyVeigas Banned

    Messages:
    212
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Really? That looks just about the right coding... Can you post your full code here?
     
    TonyVeigas, Aug 22, 2008 IP
  5. cri8bat

    cri8bat Well-Known Member

    Messages:
    1,459
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    160
    #5
    sure the adsense ads in under <div id="adsense_article">

    and <div id="adsense_article"> CSS rules are:

    #adsense_article {
    float: right;
    margin-top: 5px;
    margin-right: 10px;
    margin-left: 20px;
    }
     
    cri8bat, Aug 22, 2008 IP
  6. Fka200

    Fka200 Guest

    Best Answers:
    0
    #6
    I see no reason why it wouldn't work though. Try the div tag I posted and update the thread so I can take a quick look if you want. I see you're reading the thread... and I have 5 minutes to spare ;)

    EDIT:

    <div style="float: left; margin: 3px 3px 3px 3px;"> ADSENSE CODE HERE </div><p>Yes, you heard me right. You ca...

    That's what it'd look like...

    You can just remove the <div id="adsense_article"></div>
     
    Fka200, Aug 22, 2008 IP
  7. cri8bat

    cri8bat Well-Known Member

    Messages:
    1,459
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    160
    #7
    I done that and still not working
     
    cri8bat, Aug 22, 2008 IP
  8. tankard

    tankard Well-Known Member

    Messages:
    1,018
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    185
    #8
    Hey, I bet the problem is in your styles.css

    #article_content {
    	margin-top:60px;
    	float: left;
    	width: 750px;
    	background-color: #aacae1;
    Code (markup):
    Both your adsense code and article is contained within this DIV and it tells it to float left. I would try to delete this line float:left and see how does it look. And see where else you have this float: left

    Well, I mean, if everything floats left then it may be confusing.

    or try to add block
    <div style="display:block; float:left; yadda yadda">
    
    Code (markup):
     
    tankard, Aug 22, 2008 IP
  9. PrezWest

    PrezWest Member

    Messages:
    34
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
    #9
    OK. Here's how you fix it. Change your code to this and it will work.

    
    
    #article_content {width: 650px} 
    
    #article_content p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 2em;
    margin-right: 20px;
    margin-left: 20px;
    }
    
    
    HTML:
    1. Basically, add "#article_content" to the style sheet and declare "width: 650px" there.

    2. Remove "width: 650px" from "#article_content p" because it makes the paragraphs too wide to be next to the ad.

    3. Remove "float: left" from "#article_content p" because you don't want the paragraphs to be floated, only the ad itself. The article content paragraphs remain in the regular flow of the document.
     
    PrezWest, Aug 22, 2008 IP
    cri8bat likes this.
  10. cri8bat

    cri8bat Well-Known Member

    Messages:
    1,459
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    160
    #10
    Hi,

    I tried to removed the float left to the article_content div and didnt work
    I also tried to ad a block it also didnt worked :S

    how can I fix this :S

     
    cri8bat, Aug 22, 2008 IP
  11. cri8bat

    cri8bat Well-Known Member

    Messages:
    1,459
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    160
    #11
    Dude it worked !!!

    thank you mate :)
    reput added :D

     
    cri8bat, Aug 22, 2008 IP
  12. monfis

    monfis Well-Known Member

    Messages:
    1,476
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    160
    #12
    Looks like I found the experts.

    Nothing to do with this theme, (sorry)

    I am struggeling with an TNX code!

    My problem is to get it working on a site, set up in html - not in php!

    Server says they set it up correctly but I cant get it working???
     
    monfis, Aug 22, 2008 IP
  13. stackman

    stackman Peon

    Messages:
    840
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Just put a table, wide enough to hold the ads, in your content, either right or left aligned.
     
    stackman, Aug 22, 2008 IP