Positioning of AdSense - Post ID 8615

User 432173 Photo


Registered User
6 posts

Hi,

a inserted code from Google for an AdSense on my site
http://www.savjetnik-za-stolariju.com/pvc.html
The ad is on the bottom on the left. How can i get it
to be on the right side near the text, but not on the bottom.

Thanks
User 432173 Photo


Registered User
6 posts

P.S. I use CoffeeCup HTML Editor 2007
User 355448 Photo


Ambassador
3,144 posts

You can use CSS with your html and set a second area on the right and move your adsense code into that area.

Put a <div> around your current code, and style it to float left, and set the width to whatever you want. Put a second division around the adsense code and set it to float right. You may need to play around with the settings, but it will work.

You can also use CSS to reduce the file size of your page by putting all the styling from <td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ece9d8; WIDTH: 198.55pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" valign="bottom" nowrap width="265">



<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></O:P></span></p></td>

into a single style statement instead of repeating it for each table cell.
User 432173 Photo


Registered User
6 posts

Thanks for your answer but I'm not familiar with css, is it possible to make it with some simple code in html?
User 355448 Photo


Ambassador
3,144 posts

Surround your current code with a div statement.
<div style="float:left; width:500px;">
most of your code goes here
</div>

<div style="float:right; width:100px;">
adsense code goes here
</div>

That may work, but it may take some adjusting.

You are using CSS. You can have an external CSS file, you can have internal CSS in the head of your code, and you can have inline CSS such as the style="width:100px;"

By taking all those duplicate style statements and putting them in the head of your code, you will reduce the file size of your page. If you use the same style in more than one page, you can link to an external style file and again reduce the file size of your page (making it load a little faster).

I don't remember how the 2007 editor worked, but the 2008 version has a lot of helps including auto-complete which works with the style statements as well as the normal html.
User 432173 Photo


Registered User
6 posts

Hi Bill,

thank you very much, it works now!

Greetings from Croatia

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.