Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot position Google +1 button with CSS?

I'm having some trouble positioning the Google +1 button on my website. The div is as follows:

<div class="g-plusone"></div>

The CSS I'm using is pretty simple:

.g-plusone
{ 
position: absolute; 
top:95px;
left:715px; 
}

Despite what would seem straightforward, it simple does not want to move.

I know for a fact that the div in question is being accessed. What's strange is that other social sharing buttons, such as the FB like below follow the same syntax and are positioned perfectly.

.fb-like 
{
position: absolute; 
top:62px;
left:715px; 
}

Adding !important to the values does nothing, unfortunately.

Any ideas?

like image 903
styke Avatar asked Apr 14 '26 23:04

styke


1 Answers

When Google loads +1 button the .g-plusone class seems to disappear, so try to put this DIV inside another DIV, as illustrated below:

HTML:

<div class="google-button">

    <div class="g-plusone"></div>

</div>

CSS:

.google-button
{ 
position: absolute; 
top:95px;
left:715px; 
}
like image 81
Marcio Mazzucato Avatar answered Apr 16 '26 11:04

Marcio Mazzucato



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!