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

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

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="^$">


Do you mean a border besides the one you can create in the AdSense set-up?

No, I dont mean the border in adsense set up. But i want to creat one separately.

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="^$">

Thanks and please tell me the complete code as i dont know anything
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/
You can create different border styles, such as none, hidden , solid, dashed, dotted, double, groove, ridge, inset, outset.
Thanks for sharing the link, it helps
Bookmarks