← Back to Upcase

Fit a particular section on the browser

(Charlieanna) #1

@kylefiedler. This is the website I am working on


If you see there are different sections on the webpage. What I want to do is fit each section completely on the browser. So on one laptop I can see the whole of the section but on another only 80 percent of the section is visible. Is it possible to make sure that on each screen 100 percent of the section is displayed?


(Peter Tellgren) #2

Seems to me that what you need is some JS scripting to detect the screen size of the browser and adjust the css of each section accordingly.

(Charlieanna) #3

Cool. Will do that. That should work. :slight_smile:

(Kyle Fiedler) #4

@charlieanna You could also use the vh unit too depending on what browsers you need to support.

(Edwin Morris) #5

@charlieanna echoing @kylefiedler, here’s a jsfiddle using vh to make objects 100% of the viewport height: http://jsfiddle.net/sHYg7/