Can layers become hidden for small screen size?

Discussion in 'CSS' started by TheNeeper, Sep 6, 2006.

  1. #1
    I had a tough time with that subject line.

    Question. I have a 3 column, CSS layout, with the outer 2 layers are strictly for design purpose. Problem is they reach slightly over 900px across. Is it possible for these 2 layers to become hidden based upon screen size? I know screen size can not be efficiently tracked, although I am wondering if browsers can detect horizontal scroll? Any ideas anyone?
     
    TheNeeper, Sep 6, 2006 IP
  2. wmburg

    wmburg Active Member

    Messages:
    300
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #2
    How about this

    
    <script type="text/javascript">
    <!--
    if ((screen.width<1024) && (screen.height<768))
    {
      document.write("<style>div#divIdToHide { display: none; }</style>");
    }
    //-->
    </script>
    
    Code (markup):
     
    wmburg, Sep 8, 2006 IP