MyBB Community Forums

Full Version: Apply code on logo
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to now how I put Google Adsense just on my logo, see pictures.
That would be a bad idea. But in that theme, i haven't used an image for container background.
So, just use your logo as background of container with no-repeat and top center.
Then instead of logo code in your header templates, use the adsense code.
I put code in the another part..., thanks.
For that u need to have to reduce the logo width and make the adsense code float to right of header.

Find .logo{ in global.css of your theme and just change its width to 70%

And now add the ad code by making a class that floats right.

This may be a bit complicated.

Another option is to make a panel which is transparent and make it float over logo.
Here is a tut for it Smile

Add this code in ur global.css at bottom
.adspanel {
width: 520px;
padding-top: 12px;
padding-bottom: 12px;
padding-right: 10px;
padding-left: 10px;
margin-left: 620px;
margin-top: -5px;
height: 90px;
background-color: rgba(0, 0, 0, 0.10);
position: absolute;
top: 20px;
font-size: 12px;
}

.adspanel a:link {
}

.adspanel a:hover {
text-decoration: none;
}

.adspanel a:visited {
}

Now html needs to be edited,go to header template and find this code and just add the code with below

<a name="top" id="top"></a>
<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>

Add this code 

<div class="adspanel">
YOUR AD CODE
</div></div>

Thats it you are done with the ad in the header panel.
Thanks Envira, but I renounced of this ADS..., no to be worth one's while.