ArchangelS
Registered
Имали начин , когато няклой влезне в сайт с резолюция различна от 1024х768 , да му прави резолюцията на сайта на 1024х768 ?
Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<script>function getSize() {
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
return [myWidth, myHeight];
}
function load_css(){
var size = getSize();
var headID = document.getElementsByTagName("head")[0];
var cssNode = document.createElement('link');
cssNode.type = 'text/css';
cssNode.rel = 'stylesheet';
cssNode.href = 'css.php?width=' + width + '&height=' + height;
cssNode.media = 'screen';
headID.appendChild(cssNode);
}
window.onload = load_css;
</script>
<?php
header( 'Content-Type: text/css' );
$width = (int)$_GET['width'];
$height = (int)$_GET['height'];
$cssString = '';
//тук вече с няколко ифчета според размерите си настройваш колко да са ти широко контейнерите, колко да ти е голям текста и тнт.
//всичкият цсс го натикваш в cssString и го подаваш на браузъра
echo $cssString;