Sunamena Posted July 23, 2016 Share Posted July 23, 2016 Greetings,Question 1: I want a width of example: 70% on my viewport, resizing will not alter the wiidth. I tried 70vw, but this did not do the trick. How can i achieve this?Question 2: When my screen gets smaller, I want to change the % used on certain DIV widths, how can I achieve this?Thanks in advance =D Link to comment Share on other sites More sharing options...
dsonesuk Posted July 26, 2016 Share Posted July 26, 2016 You cant change viewport width of a device :-), only html elements, any element given 70vw will always be 70% of total width device viewing area. You would have use media queries to adjust percentage width depending of device viewport width. Link to comment Share on other sites More sharing options...
James_Purcell Posted July 30, 2016 Share Posted July 30, 2016 I used media query's on mine to "Pad" the screen edges which saves a lot of coding. what is vw? Link to comment Share on other sites More sharing options...
dsonesuk Posted July 30, 2016 Share Posted July 30, 2016 vw = viewport width vh = viewport height 70vw, 70vh = 70% width and height of viewport area size. Link to comment Share on other sites More sharing options...
James_Purcell Posted August 1, 2016 Share Posted August 1, 2016 vw = viewport width vh = viewport height 70vw, 70vh = 70% width and height of viewport area size. Ah thanks, more modern secret codes. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now