I have a simple static website with a couple lines of text in it.
It will be accessed only from mobile devices, and I want that the font size for the text will be 1/3rd of the screen's height and lines to word wrap based on the screens width.
can it be done using CSS & HTML only? if so how?
Thanks
The simple answer is to programmatically serve a stylesheet based on the mobile device. You can do this in your CSS file with :
Alternately, you could use javascript to calculate the width and height of the viewport then set the style dynamically.
Set wordwrapping in CSS with
white-space: normal
and, if desired,word-wrap:break-word