johnsmith153 Posted November 11, 2010 Share Posted November 11, 2010 Can I set text size based on a % of the parent div ? So I could set to 5% and if div was 300x300 the font size would be 15px. This is mainly for when the div itself is a % of the browser window (so changes as you resize the window). I have a layout which on a mobile phone obviously has a narrow div, and on a desktop it is very wide. I would like small px text on the mobile and larger on the desktop (% of div size). I don't want to use different stylesheets etc. I want the text to resize as the window does. Quote Link to comment https://forums.phpfreaks.com/topic/218432-text-size-as-of-div-is-it-possible/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.