Question
8
Replies
158
Views
Accenture
Posted: February 27, 2018
Last activity: April 9, 2018
How to increase font size of the links for Mobile app
Hi,
I have a requirement to increase the font size of the Links only for Mobile app. I am trying to modify UserWorkform to add script, but it is not working.
<Script>
var ua=navigator.userAgent;
var isiOS = /iPhone/I.test(ua) || /ipad/i.test(ua);
$(document).ready(function() {
if(isiOS){
Link[for="property"]
{
font-size:20px;
}
}});
</script>
You can add CSS via DOM manipulation. See this article...
https://www.w3.org/wiki/Dynamic_style_-_manipulating_CSS_with_JavaScript
However, I would suggest that you look into doing it through responsive CSS instead...
https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html
You can add custom CSS to the skin rule and it will be easier to find and maintain long-term.
- James