Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Issues with VH & VW in iOS

I am having issues getting vh and vw properties to work in ios. I am trying to use Javascript to set the window of ios device to 100vh & 100vw. This way when the css properties are called, the will work (hopefully). I am not certain how to formulate this. So if you can tell me how to structure the JS correctly or if you have experience with making vh and vw work in ios, please give me some pointers.

I was trying to integrate "BuggyFill" into my project, but I wasn't having any luck getting that to work either. If anyone has experience with BuggyFill, I would appreciate help with how to use this correctly in my project.

Here is some of the code I was trying to use to orient the window height code...

window.height() === 100vw;

OR

window.height(100vw);

1 Answer

I am no CSS ninja but I always thought the window was kinda default 100vw and 100vh. Here is a link to an article that might answer help you out http://www.weareconvoy.com/2014/07/css-vw-and-vh-units-are-they-worth-using-yet/

Also I thought vw and vh only had issues with opera mini.