- Jun 8, 2001
- 9,574
- 2
- 76
I currently have the below code to not display a banner if the users resolution is >=1024x768. The problem is, the "hidden" attribute still takes up space on the screen, making the formatting look all wrong. Is there an alternative to this I can use so that it won't display anything, even a space?
<script type="text/javascript">
if((screen.width >= 1024) || (screen.height >= 768))
{
document.getElementById('google').style.visibility = "hidden";
}
</script>
<script type="text/javascript">
if((screen.width >= 1024) || (screen.height >= 768))
{
document.getElementById('google').style.visibility = "hidden";
}
</script>