Note that there are some explanatory texts on larger screens.

plurals
  1. POAllow user to change the web page font sizes - ASP.Net
    primarykey
    data
    text
    <p>I want to provide a feature on my website to let users increase and decrease the font size by clicking on some stuff (like + and - image etc). However I also want:</p> <ul> <li>make sure that when the font size is increased, my website layout doesn't get messed up</li> <li>test the scenario out on my machine to make sure about the point above</li> </ul> <p>I think what I want is a solution that is independent of the browsers font size and machines font size otherwise i would have no way of testing and controlling the results</p> <p>in my web application, i haven't hard coded font sizes but in some place i have specified text boxes length like width = 50px which i think needs to be changed..so what unit should i use?</p> <p>i am thinking of using themes and defining the font sizes of labels and text boxes as small, smaller, bigger etc ..not sure if that will work?</p> <hr> <p><strong>Update:</strong> I asked the question on another forum as well: <a href="http://forums.asp.net/t/1453926.aspx" rel="nofollow noreferrer">http://forums.asp.net/t/1453926.aspx</a></p> <p>Basically, from all the answers, I gathered that there are two approaches:</p> <ol> <li>Use em and body font size: body { font-size: 62.5%; } p { font-size: 1.2em; }</li> </ol> <p>and when you have to increase/decrease font size, simply increase/decrease the body font size percentage</p> <ol start="2"> <li>Use absolute font sizes: css defines a range (7) of font sizes from xx-small to xx-large so you can define font-size: small in css..</li> </ol> <p>i found a good article on these font sizes at: <a href="http://meyerweb.com/eric/articles/webrev/199908a.html" rel="nofollow noreferrer">http://meyerweb.com/eric/articles/webrev/199908a.html</a></p> <p>however none of these two options is what i was looking for. I was looking for setting absolute sizes in the real sense so if i set font-size:large, and then i increase the browser size, font sizes should remain same..right now even with these"absolute font sizes" its dependent on current browsers font size. Any help????</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload