Results 1 to 2 of 2

Thread: How to use css media querys & viewport

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    How to use css media querys & viewport

    How can i make it so my website is displayed 1080px on all devices except anything less than a width of 480px.

    Im using the viewport meta tag, which works fine for all devices:
    Code:
    <meta name="viewport" content="width=1080">
    However i would like to be able to override the meta tag only on devices less than 480px.
    Code:
    @media (max-width: 480px){
    //my mobile site css
    }
    Ive searched the internet and found this code, but im not sure how to use it.
    Code:
    @viewport{ width:1080px;}
    @-ms-viewport{width:1080px;}
    Any ideas?
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

  2. #2
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: How to use css media querys & viewport

    I'm not an expert on media queries, but this site might help you? http://cssmediaqueries.com/
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width