I’ve got a code to generate minimum height equal to window height (no, setting it in CSS to 100% doesn’t work.)
so in the end, in a PHP file, I’ve got
min-height:<?php if (isset($_GET['width']) AND isset($_GET['height'])) { echo "". $_GET['height'] ."<br />\n"; } else { echo "<script language='javascript'>\n"; echo " location.href=\"${_SERVER['SCRIPT_NAME']}?${_SERVER['QUERY_STRING']}" . "&width=\" + screen.width + \"&height=\" + screen.height;\n"; echo "</script>\n"; exit(); } ?>px;
I know that’s kind of yucky, but it’s just on one line. I’ve got this working properly and it DOES work but my end result is
"min-height:1080
px;"
and I need it to NOT be broken, just “min-height:1080px;”
I’m sure the fix is incredibly simple, it’s been a long day 😛
The solution seems very strange. Why are you mixing up CSS and JS?
In any case, the piece of code
"<br />\n"is causing a line break.Anyway, make your code readable!