mercredi 28 décembre 2016

(HTML)Cant store the browser height into variable and use the same in a class which is used for a div?

How do I get the height of the browser window in jquery and use that in a class in CSS.I used this code but it doesn't work , some modifications are needed

<style>
.browserHeight
{
height:h ;
}
</style>

<body>
<div class="container browserHeight"> ANOTHER PAGE 
</div>
</body>

<script>
var h=$(window).height()+"px";
</script>




Aucun commentaire:

Enregistrer un commentaire