Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    responsive menu, non-responsive site

    Hello,

    This is more of a directional question.

    Is there a way to run a responsive elements, say a responsive menu, inside a non-responsive website - that is, a website in which there can be no viewport tag. Alternatively, is there a recommended approach to achieving the same effect where a menu alone would be properly proportioned for mobile screen sizes?

    Thanks for any help.

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,138
    Thanks
    7
    Thanked 257 Times in 256 Posts
    You can certainly use css media queries to affect part of your site (e.g. your menu) and not affect the rest of the site. Not quite sure why you'd do it, but yes it's completely doable.

    Dave

  • #3
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Media queries require a viewport tag.

  • #4
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,138
    Thanks
    7
    Thanked 257 Times in 256 Posts
    Quote Originally Posted by ccarsona View Post
    Media queries require a viewport tag.
    For a mobile device, I suppose yes.

    I didn't get your question then... You want to make a menu that's based on the browser size, but the rest of the site is fixed? What about just basing the menu in % and the rest in px? Or do you need more control than just the size of the menu items?

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,472
    Thanks
    6
    Thanked 980 Times in 953 Posts
    Quote Originally Posted by ccarsona View Post
    Is there a way to run a responsive elements, say a responsive menu, inside a non-responsive website - that is, a website in which there can be no viewport tag.
    A “viewport tag” (I suppose you mean the meta element?) has nothing to do with responsiveness.

    And also, media queries don’t require a “viewport tag”.

    You should get your facts straight and then re-ask your question in a way that makes sense.

  • #6
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, a meta viewport tag. An iPhone will not zoom in without one.

  • #7
    New Coder
    Join Date
    Feb 2013
    Location
    Liverpool
    Posts
    68
    Thanks
    1
    Thanked 3 Times in 3 Posts
    you simply need the following meta tag

    Code:
    <meta name="viewport" content="width=device-width, initial-scale=1">
    which enables media queries to make your layouts fluid on mobile devices such as iPhones and iPads - this does not prevent media queries working in the browser or other devices though - it's simply to do with enabling them so they don't show a "zoomed out" version on those devices
    Working for Edge Three Sixty doing Drupal Development


  •  

    Posting Permissions

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