2
Some way to do this in CSS3?
if(window.innerWidth <= 1000) {
var ecra = window.innerWidth;
$(".topo").css("height",ecra*0.293);
}
I tried to
@media screen and (min-width: 0px) and (max-width:1000px) {
.topo {
height: calc(device-width*0.293);
}
But I can’t find the screen size with css
in css not t in how only form is vc using vh or %
– Jasar Orion
What do you mean? I don’t understand!
– Carlos Rocha
face css or vc uses % in the sizes or pixel or VH of a googada but anyway to catch the current screen height so with javascript
– Jasar Orion
It is. The problem is that with each screen resolution I have a different size for a div
– Carlos Rocha
cannot use javascript ?
– Jasar Orion
no, I also tried Calc(device-width*0.293) but it did not help. I could not recover the size of the screen
– Carlos Rocha
cara javascript funciona semrpe usei para calcula tamanho da tela da uma googada q vc acha: procure por how to get screen size Whit java script
– Jasar Orion
The way I did is working correctly. But I’d like to leave only css if it’s possible
– Carlos Rocha
Screen size is 100%.
calc(100% * 0.293)
. The numbers of the operators must be separated. It cannot be attached:calc(100%*0.293)
.– Diego Souza
the problem is that I need to multiply 100%* 0.293 and find the height of a div from the screen length. Will it work?
– Carlos Rocha
Javascript only.
– Diego Souza
rsrs, tried here, gave no. Thanks!]
– Carlos Rocha