bravo14 Posted November 15, 2014 Share Posted November 15, 2014 Hi Guys I am using media queries to set a different CSS if a mobile device. I am using 100% width on certain containers but the styling is using 100% based on the landscape orientation and not whichever way the device is being displayed. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/> .slicknav_menu{ visibility:visible; position:fixed; top:0; width:100%; z-index:100; } as mentioned, this uses the landscape width even if the site is being displayed in portrait. How can I fix this? Quote Link to comment https://forums.phpfreaks.com/topic/292490-100-width-based-on-orientation/ Share on other sites More sharing options...
wright67uk Posted January 21, 2015 Share Posted January 21, 2015 You could try; Width: 100vw; instead of 100% Quote Link to comment https://forums.phpfreaks.com/topic/292490-100-width-based-on-orientation/#findComment-1503660 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.