SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2011
    Location
    Karachi
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Border around adsense ads

    I want to enclose my adsense in a box. I mean a border around adsense. What is the html code for doing this?

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,815
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Simply set the ad bordor colour to what you want it to be. Google ads only don't display a border if you make the border the same colour as your background.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Addict Green Moon's Avatar
    Join Date
    Jun 2008
    Location
    United States
    Posts
    329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean a border besides the one you can create in the AdSense set-up?

  4. #4
    SitePoint Zealot
    Join Date
    Sep 2011
    Location
    Karachi
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, I dont mean the border in adsense set up. But i want to creat one separately.

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,815
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    In that case wrap the ad inside a div and apply the border to the div.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  6. #6
    SitePoint Zealot
    Join Date
    Sep 2011
    Location
    Karachi
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks and please tell me the complete code as i dont know anything

  7. #7
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    This will give you a div with a border:
    Code html4strict:
    <div style="border:1px solid #000;">
    <!-- Whatever code -->
    </div>

    I would recommend this tutorial for you, which will take you through the basic steps of web coding: http://www.sitepoint.com/html-css-beginners-guide/
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  8. #8
    SitePoint Member RonnanR's Avatar
    Join Date
    Aug 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can create different border styles, such as none, hidden , solid, dashed, dotted, double, groove, ridge, inset, outset.

  9. #9
    SitePoint Member
    Join Date
    Jul 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for sharing the link, it helps


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •