Hey, when you height: x%; or width: x%; of a div. It actually stays that percentage of screen. Now matter how badly you'll mess up entire page. It's still gonna be x% wide and x% height. Well, I tried that with font, but browser doesn't seem to be able to understand what I meant. When I put font-size: 120%; it actually enlarges font by 1/5th but uh, that's not what I meant. I wanted it adjust itself always when it's parent is resizing.

edit - I'll try that one out: http://jsfiddle.net/tomsoderlund/26Gad/light/

Recommended Answers

All 2 Replies

The font-size of 120% is calculated against the font-size set on the body element not the width or height of the screen. So if the body is set at 100% for example, setting an element to 120% will result in the 1/5th size increase.

The link in first post in working.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.