Home › Forums › Any Mobile Theme Switcher › Color & Styling of link
- This topic has 7 replies, 2 voices, and was last updated 7 years, 5 months ago by
Dinesh.
- AuthorPosts
- August 14, 2013 at 3:50 am #1800
Christina
GuestFor the life of me I can’t figure out how to change the styling of the links on the mobile version of the site.
This is my code
<a class="switchmobile" href="site.com/?am_force_theme_layout=mobile">Switch To Mobile Version</a> The following is a bit overboard but I was trying everything I could think of
a.switchmobile:link, a.switchmobile:visited, a.switchmobile:active, a.switchmobile:hover {
font-size: 36px !important;
color: #ff0000 !important;
text-decoration: none;
}`The above works on the desktop theme but when I change layout=mobile to layout=desktop, then view the mobile version, the css doesn’t work.
I’ve also tried using a.am-switch-btn in the CSS.
In short:
CSS works when viewing desktop version
CSS does not work when viewing mobile version
Codes are 99% identicalAugust 14, 2013 at 3:53 am #1801Christina
GuestBlah ….. didn’t close the code box. Can’t find an edit button so I’ll try that again.
Switch To Mobile Version - See more at: https://dineshkarki.com.np/forums/topic/color-styling-of-link#sthash.thZeUCtQ.dpuf
a.switchmobile:link, a.switchmobile:visited, a.switchmobile:active, a.switchmobile:hover { font-size: 36px !important; color: #ff0000 !important; text-decoration: none; } - See more at: https://dineshkarki.com.np/forums/topic/color-styling-of-link#sthash.thZeUCtQ.dpuf
August 14, 2013 at 3:54 am #1802Christina
Guest*laughs* I give. Hopefully someone can translate that and help.
Again,
CSS works when viewing desktop version
CSS does not work when viewing mobile version
Codes are 99% identicalAugust 14, 2013 at 1:06 pm #1804Dinesh
KeymasterCan you send me your site url ?
August 14, 2013 at 3:11 pm #1806Christina
GuestCan I send it via email or pm? Don’t want the url out for public viewing.
August 15, 2013 at 3:31 am #1810Dinesh
KeymasterHi Christina,
Thanks for your url.
I have found that you are using the wrong css selector based on your element structure as below.
The css selector should be like this.
.switchmobile a:link, .switchmobile a:visited, .switchmobile a:active, .switchmobile a:hover { YOUR CSS STYLING GOES HERE}Hope this help.
Thanks
August 15, 2013 at 3:51 am #1812Christina
GuestDangit. I swear I tried that. *laughs* .class a:link is how I normally write all of my code so I wonder what I’d written before that made it not work.
At any rate, it’s fixed now. Thanks a bunch!
August 15, 2013 at 3:52 am #1813Dinesh
Keymaster🙂
- AuthorPosts
- The topic ‘Color & Styling of link’ is closed to new replies.