I have asked this question on the AddThis forum but have not had any replies so far. Hopefully someone can help me on this.
The page in question is on http://preview.ami.co.nz/products, in the bottom right corner.
If viewed in Chrome or Firefox the word "Share" is to the left of the orange "+" AddThis button.
However, on IE (at least IE8 and 6) the word "Share" is to the right! It is supposed to look like it does on Chrome and FF but I can't figure out what IE is doing to it.
To make things even more peculiar - the very same code on a different page looks correct in all browsers! Check out http://preview.ami.co.nz
Any suggestions would be greatly appreciated.
PS. Here's the markup I put on those pages:
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style" style="display: <%= SocialMediaVisibility %>">
<a class="addthis_button_compact">Share</a>
<a class="addthis_button_facebook"></a>
<a class=&q开发者_如何学运维uot;addthis_button_twitter"></a>
<a class="addthis_button_email"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e0a5ac2480330c8"></script>
<!-- AddThis Button END -->
just change the HTML of your website from
<a class="...">
<span class="the_icon_class"></span>
share
</a>
to
<a class="...">
<span>share</span>
<span class="the_icon_class"></span>
</a>
@DanyW, i saw you website code may be there is the problem with your class
specifications. In your product page you specify float:right
in .addthis_default_style .at15t_compact
& float:left
.addthis_default_style .at300bs
. So, in firefox & chrome it's takes float:right
& in IE it's take float:left
& it's work fine in other page's because you specify your class much more clear then products page reason you specify float:right
in #pageBottom .footerPanel .addthis_default_style .at15t_compact
now the priority of float:right
is increased.
solution: write this
#pageBottom .footerPanel .addthis_default_style .at15t_compact{float:right}
in product page
or you do this
.addthis_default_style .at15t_compact{float:right !important}
This should do the trick. Just add this rule to the end of your stylsheet:
.addthis_default_style.addthis_toolbox span{
line-height: 16px;
float: right; /* this will move the span back over to the right */
}
You have below style in http://preview.ami.co.nz/styles/ami.css
file
.addthis_default_style .at15t_compact
{
float: right;
margin-left: 4px;
margin-right: 0;
}
in FF the span for share link is taking float: right
but in IE the span is not taking float right, because of this you are seeing share text on right side of the addthis button.
I think adding important to float right will help you.
float: right !important;
otherwise use IE specific styles. Check http://css-tricks.com/132-how-to-create-an-ie-only-stylesheet/ and http://webdesignerwall.com/tutorials/css-specific-for-internet-explorer
Try this one out
.at300bs.at15nc.at15t_compact { float:right; }
For some reason IE is chocking with the selector and floating it left, instead of right.
.addthis_default_style .at15t_compact
{
float: right !Important;
}
The important part is the "!Important"
Should fix this weird IE glitch.
Both Matthew and Pavel's solutions will work, if you add "!important" to the CSS.
Or you could move the word "Share" to a separate button:
<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button" style="float: left">Share</a>
<a class="addthis_button_compact"></a>
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_email"></a>
</div>
You may also want to consider removing the "addthis_default_style" class name, and defining the styles yourself (to avoid issues down the road if AddThis changes their CSS). Here's what that might look like:
<div class="addthis_toolbox">
<a class="addthis_button">Share</a>
<a class="addthis_button_compact"></a>
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_email"></a>
</div>
<style>
.addthis_toolbox {
margin-top: -27px;
float: right;
}
.addthis_toolbox a {
display: block;
float: left;
margin-left: 5px;
}
</style>
It's an old problem with floats. Actually even ie9 has it. You can add some styles to fix it:
.addthis_button_compact{
position: relative;
padding:0 23px 0 0;
}
.addthis_button_compact span{
position:absolute;
right:0;
}
精彩评论