viewport-units Questions
3
Solved
I have an app that is full-screen
<div class="h-screen flex flex-col">
<div>
Header
</div>
<div class="flex-1 overflow-y-auto">
Main
</div>
...
Cantilena asked 3/11, 2023 at 19:12
38
Solved
I have a very odd issue... in every browser and mobile version I encountered this behavior:
all the browsers have a top menu when you load the page (showing the address bar for example) which sli...
Wilkey asked 9/5, 2016 at 9:32
8
How to solve the incompatible units problem?
@mixin square-size($size, $min: $size, $max: $size) {
$clamp-size: min(max($size, $min), $max);
width: $clamp-size;
height: $clamp-size;
}
The inp...
Antonantone asked 8/1, 2019 at 10:59
2
Solved
In order to make my header fit with all the viewports, I'm using the classic CSS rule height: 100vh; and it works like a charm… except on my mobile.
Actually, on the bottom of the screen the header...
Alfieri asked 20/10, 2022 at 17:29
9
I've used vh (viewport units) css in one of my projects but in mobile safari it doesn't work. It seems like Safari doesn't know what to do with vh, but it works fine in other browsers. I would like...
Baudelaire asked 22/4, 2014 at 14:58
2
I've tried to create a login form using ONLY vh sizes.
Doing this, in the hopes that the form, in all, would scale accordingly to the viewport.
It doesn't! For some reason zooming in, creates a b...
Linn asked 4/3, 2015 at 19:59
15
As mentioned in the title, is it possible to calculate the vw without the scrollbars in css only?
For example, my screen has a width of 1920px. vw returns 1920px, great. But my actual body w...
Blavatsky asked 9/11, 2015 at 10:0
5
Solved
I want to specify my font size using vw, as in
font-size: 3vw;
However, I also want to limit the font size to say 36px. How can I achieve the equivalent of max-font-size, which does not exist--i...
Zeldazelde asked 10/11, 2016 at 13:0
3
I am creating an HTML email template. The desktop version is done with tables, few inline css, all sizes are defined in % or px values.
For the mobile version I work with divs and css. Now I'd lik...
Kinesiology asked 4/12, 2015 at 7:58
2
I want to use a transform: scale where my width changes to 80vw and my height is auto. So this is what i want = transform: scale(80vw, auto);. Unfortunately, this doesnt work. Is there another way ...
Slug asked 23/9, 2018 at 16:5
7
Solved
I just learned about a new and uncommon CSS unit. vh and vw measure the percentage of height and width of the viewport respectively.
I looked at this question from Stack Overflow, but it made the ...
Sparkie asked 25/6, 2015 at 1:58
1
Background
I size everything using viewport units:
body {
font-size: calc((1vw + 1vh) / 2);
}
h6 {
font-size: 1em;
}
div {
width: 20em;
}
As the number of pixels in the screen increases, so...
Mistreat asked 28/3, 2019 at 0:1
7
I have a div tag and I realized that it is not filling 100% of the height as it should.
My code:
#container {
width: 100vw;
height: 100vh;
background: purple;
}
body {
margin: 0px;
}
<...
Zuzana asked 9/4, 2021 at 21:47
4
Solved
Can anyone explain how fallbacks work in CSS? I am trying to set it up for vh and vw and clearly I am not getting it...
Here is my attempted solution, which does not work. The height property is t...
Karlakarlan asked 28/4, 2014 at 20:22
6
Solved
I'm using 100vh to center a div vertically with line-height. This site puts support for vh and vw at around 70%, is that a fair assessment? Would you recommend using viewport units when building a ...
Cope asked 7/2, 2014 at 9:34
2
Trying to make full screen frames using 100vw and 100vh on divs. I have 2 in this JSfiddle and as you can see there's extra space both on the bottom and on the right of each frame.
Is there a way o...
Granddad asked 15/8, 2014 at 2:5
1
I am working on a WordPress theme and want to enable users to use full-width blocks in it. For this I am using the following HTML/CSS structure (reduced to the basic problem).
(note: although this ...
Hannover asked 4/11, 2019 at 17:29
2
Solved
In the sample Dash application below, I am attempting to create a dynamic layout with a variable number of rows and columns. This dynamic grid-style layout will be populated with various graphs tha...
Eam asked 1/4, 2019 at 20:12
2
Unfortunately 100vh is not always the same as 100% browser height as can be shown in the following example.
html,
body {
height: 100%;
}
body {
overflow: scroll;
}
.vh {
backgro...
Umbilical asked 8/12, 2015 at 21:27
2
Solved
I am using Plotly-Dash and need the font size of my text annotations to scale with the viewport width, as my graphs do. For various headers in my layout, I am able to directly set font-size: '1vw',...
Kafiristan asked 27/12, 2018 at 23:4
4
Solved
From what I've seen in other answers, CSS viewport units can't be used in calc() statements yet. What I would like to achieve is the following statement:
height: calc(100vh - 75vw)
Is there some...
Problematic asked 20/1, 2014 at 0:16
2
Solved
width: 100vw;/* 100% of viewport width */
height: 100vh;/* 100% of viewport height*/
This CSS should give me the exact(100%) dimensions of the viewport. But it is apparently too large because it'...
Torrietorrin asked 26/4, 2015 at 17:55
1
As per How to properly use css-values viewport-relative-lengths?, I've tried using viewport units in the following way, to automatically magnify a tiny page on a big monitor:
/* automatically magn...
Armament asked 12/5, 2015 at 3:11
4
I'm trying to use a flexbox-based layout to get a sticky footer for my page. This works well in Chrome and Firefox, but in IE11 the footer sits just after my main content. In other words, the main ...
Mcentire asked 7/8, 2014 at 8:35
2
I'm having trouble with vw and vh units on OSX Safari.
Take this code as an example:
<body style="margin: 0;">
<div style="background: red;
height: 100vh;
width: 100vw;"><...
Stipendiary asked 17/8, 2016 at 9:59
1 Next >
© 2022 - 2024 — McMap. All rights reserved.