Different icon sizes with responsive web design

bourd79 Jun 26, 2012 03:02AM EDT

Hi. I'm looking for a way to show different icon sizes depending on what platform my users is on. I'm using responsive web design, so the same website shows up differently based on what platform users are on.
I have the following hardcoded on my page:
<div class="addthis_toolbox addthis_default_style">
Is there a way to call the following part via css for mobiles users:
addthis_32x32_style
so that the default becomes
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
when a mobile phone is used to access my site?

Thanks for your time.
Ex: user is on mobile, I would love to show big icons, but use

2 Community Answers

Paul Jun 26, 2012 04:46PM EDT

There's no way to do that inside of AddThis, but you could detect the user agent in the request and add the class using your server-side code

View in conversation


Up 1 Rated Down
Paul (AddThis Happiness Specialist) Best Answer Jun 26, 2012 04:46PM EDT
There's no way to do that inside of AddThis, but you could detect the user agent in the request and add the class using your server-side code
Up 0 Rated Down
bourd79 Jun 27, 2012 10:01AM EDT
Thanks Paul. That's what I thought. Unfortunately, my design is width based and not based on the browser version. I was hoping to achieve this without having to call the addthis button twice and using display:none on one of them depending on the screen size used. Not that big a deal, it works, but it's a bit dirty IMO.

This question is closed to new answers.

Still need help?


General Topics

 

Developers