1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Centering an Adsense for search form?

Discussion in 'Placement / Reviews / Examples' started by hawkal, Apr 4, 2007.

  1. #1
    On one of my sites I was going to try adding an Adsense for search form but the thing is even with center tags around the Adsense code it always aligns to the left which looks really naff on my site. Is there a way to center the search form that is allowed by the google adsense TOS?
     
    hawkal, Apr 4, 2007 IP
  2. 8everything

    8everything Peon

    Messages:
    16,350
    Likes Received:
    903
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Centering is not against TOS

    Try this code:

    <div align="center">

    <adsense code here?


    </div>
     
    8everything, Apr 4, 2007 IP
  3. hawkal

    hawkal Peon

    Messages:
    97
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I know it isn't but as far as im aware tampering with their code is, I tried using center or <div align="center"> tags but they didnt work.
     
    hawkal, Apr 4, 2007 IP
  4. 8everything

    8everything Peon

    Messages:
    16,350
    Likes Received:
    903
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You placed a </div> at the end of the code right? Yes, changing adsense code is against TOS.. but this isn't changingn the codes at all.
     
    8everything, Apr 4, 2007 IP
  5. darthsk8r

    darthsk8r Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hello there,

    I tried the above but no luck. Any ideas?

    In the javascript section of my webpage, I have pasted the google
    adsense code. However, the ads appear left justified, while my whole
    page is centered. I am using the template provided by my web hosting
    company.

    Here is the adsense code:

    <script type="text/javascript"><!--
    google_ad_client = "pub-8412696060861566";
    //728x90, created 11/15/07
    google_ad_slot = "2248396055";
    google_ad_width = 728;
    google_ad_height = 90;
    //--></script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>

    Any thoughts on how to center the ads?

    I have tried using the <center> and
    <div align="center"> tags, but it doesn't work.

    Thanks in advance,
    darthsk8r
     
    darthsk8r, Nov 16, 2007 IP
  6. 2ndsky

    2ndsky Peon

    Messages:
    240
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    just do:

    <center>

    ADSENSE

    </center>

    or try:
    <div align="center">
    <div>all this is centered</div>
    </div>

    or with CSS: <div style=""text-align:center; "
     
    2ndsky, Nov 16, 2007 IP
  7. darthsk8r

    darthsk8r Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    None of these worked. Maybe I am not coding it properly. Does the code have to be on the same line or something simple like that?
     
    darthsk8r, Nov 16, 2007 IP