adsense via CSS

Discussion in 'AdSense' started by alexei_aus, Jun 7, 2007.

  1. #1
    Is there a way to insert adsense code into the page using CSS?
     
    alexei_aus, Jun 7, 2007 IP
  2. jakomo

    jakomo Well-Known Member

    Messages:
    4,262
    Likes Received:
    82
    Best Answers:
    0
    Trophy Points:
    138
    #2
    Hello,

    Really I don't know what do you say. Do you want to add the code under an extarnal css file? something like that?
     
    jakomo, Jun 7, 2007 IP
  3. alexei_aus

    alexei_aus Active Member

    Messages:
    626
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #3
    yeah. just add code to a part of the page using css, so that all the code is in head or is loaded via css from another file. any ideas?
     
    alexei_aus, Jun 7, 2007 IP
  4. cormac

    cormac Peon

    Messages:
    3,662
    Likes Received:
    222
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Use Server Side Includes, very useful.
     
    cormac, Jun 7, 2007 IP
  5. alexei_aus

    alexei_aus Active Member

    Messages:
    626
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #5
    wouldnt mind a little help, not just advice
     
    alexei_aus, Jun 7, 2007 IP
  6. cormac

    cormac Peon

    Messages:
    3,662
    Likes Received:
    222
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Everything you need to know can be found via Google but here's a quick run down.

    Copy & paste your adsense code into a new file and give it an extension such as .html, shtml or .inc

    Go to your main html page and paste the code <!--#include virtual="/adsense.html" --> where you want the ads to appear.

    Good thing about this is that you can edit multiple pages by just changing the include file.

    Depending on your host you may need to use specific file extensions or have them enable it. Its easily setup and well worth using.
     
    cormac, Jun 7, 2007 IP
  7. alexei_aus

    alexei_aus Active Member

    Messages:
    626
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #7
    does this comply with google adsense TOS?
     
    alexei_aus, Jun 7, 2007 IP
  8. cormac

    cormac Peon

    Messages:
    3,662
    Likes Received:
    222
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yip 100% Its a very common way of creating pages.

    *edit*

    Start with the Apache Tutorial to get more of a background. If you make standard html sites you'll not believe the hassle SSI can save you.
     
    cormac, Jun 7, 2007 IP
  9. alexei_aus

    alexei_aus Active Member

    Messages:
    626
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #9
    why idea how to do it in cfm?
     
    alexei_aus, Jun 7, 2007 IP
  10. cormac

    cormac Peon

    Messages:
    3,662
    Likes Received:
    222
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Sorry I know very little about CFM and dont even know if uses SSI. You might want to track down some of the experts on DP and ask them.
     
    cormac, Jun 8, 2007 IP
  11. Aragorn

    Aragorn Peon

    Messages:
    1,491
    Likes Received:
    72
    Best Answers:
    1
    Trophy Points:
    0
    #11
    Nope it is not possible. Because CSS is used for providing formatting to the page and cannot be used for the inserting the code. But the javascript code can be included in a separate javascript file, but that is against Google TOS.
     
    Aragorn, Jun 8, 2007 IP