Pronasao sam resenje ako nekome treba:
<script type="text/javascript">
var original_layout_size = 1024; // arbitrary
var root_element = document.getElementsByTagName("html")[0];
var original_window_size = root_element.clientWidth;
var original_font_size = root_element.style.fontSize;
function change_font_size(window_size) {
var new_font_size = Math.floor(100 * window_size / original_layout_size);
root_element.style.fontSize = new_font_size + "%";
}
window.onload = function () {
if (original_window_size != original_layout_size) {
change_font_size(original_window_size);
}
};
window.onresize = function () {
var new_window_size = root_element.clientWidth;
change_font_size(new_window_size);
};
|