Button URL

User 222062 Photo


Registered User
7 posts

Hi, I'm very new to this, but is there a way to change a buttons url depending on screen size?
Not sure where to look for this type of thing. I have a button pointing to my online store, but for mobile, it needs to point to the more basic store's sitemap and not the main page for navigation reasons. Not sure where to start for this.
Thanks for any info John
User 2088758 Photo


Senior Advisor
3,086 posts

Hi John,

Here is what I would do. Create 2 buttons, one for mobile, one for desktop and simply change the position to display none on the mobile button when your breakpoints are in the desktop view then reverse them when it gets to the lower breakpoints.
Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA
User 2903050 Photo


Registered User
260 posts

I would say you will need two identical looking buttons with the two different url's. For the mobile breakpoint I would use display:none for the button with the link you do not want and for the larger breakpoints the other way round.
Hope that makes sense but others may have a better solution?
User 2088758 Photo


Senior Advisor
3,086 posts

Haha Beat you Phil!
Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA
User 222062 Photo


Registered User
7 posts

Wow, you all are fast. :)
The site I have to fix is woodgraining.com wish me luck
Thanks, John
User 187934 Photo


Senior Advisor
20,188 posts

You could also use Jquery.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

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.