1
I have a map below a div
. My problem is that when I add altura 100%
, he takes the value of body
, below the primeira div
, appearing scroll
.
Example: jsfiddle
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Directly accessing Street View data</title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
.conteudo{width: 100%; height:100%;}
.um{width:100%; height:100px; background: red; float: left;}
.mapa{width: 100%; height:100%; float:left; background: green;}
</style>
</head>
<body>
<div class="conteudo">
<div class="um"></div>
<div class="mapa"></div>
<div>
</body>
</html>
How do I not get this Scroll, I want the two Divs to be 100% relative to the window.
I don’t understand what you want exactly ? You want the scroll not to appear?
– MagicHat
@Magichat That’s right, the two Divs should show up in the window, without going beyond the body, with examples similar to those used below... ATT
– abcd
If the answer is correct, could validate it, or any other adjustment comments, to adjust..
– MagicHat
It is correct. I tried to look for other ways to do this, but so far I have not been able... ATT
– abcd
It’s just that I don’t know exactly what you’re up to, it’s a lot of variants... But for example, if the div um is like a header you can put px at height and position:Fixed and the map at 100% height...but it will have tmb side effects... what exactly do you want?
– MagicHat
As you mentioned above, I will have a div similar to a Header, and the other that should be below according to the window (Map). I will use it in an Iframe, so it automatically adjusts to the size of the Iframe that the person creates, without SCROLL. I used CALC, but I made a script with Jquery with Resize. My big claim was to leave only with css, but something that would work in any browser. ATT
– abcd
then use Fixed...and at the time of iframe if it gives a padding or margin discounting the header...
– MagicHat
I did the tests here... It worked with Fixed. It was a bit tricky to paddle and not generate scroll (box-Sizing: border-box;). But I believe it worked. ATT
– abcd
There’s always a Gambi here and there,,,,
– MagicHat