0

I don`t know what I am doing wrong,

When I start this script the map (iframe) isnt as high as I would expect. I dont know why my height property is not working. It will make no difference when I make the value bigger. And I want to keep the value in percents so it is static.

Thnx for helping!

EDIT: I see it is written in a other question, but I can`t find a solution so far.. So my question is what should be a proper solution for my problem?

TEXTTT is personal

HTML:

<!doctype html>
<!--[if IE]><![endif]-->
<!--[if IE 7]><html xml:lang="nl-NL" lang="nl-NL" class="ie ie7"><![endif]-->
<!--[if IE 8]><html xml:lang="nl-NL" class="ie8"><![endif]-->
<!--[if (lt IE 8)|(gt IE 8)|!(IE)]><!--><html xml:lang="nl-NL" lang="nl-NL"><!--<![endif]-->
<head>
<!--[if (gt IE 8)|!(IE)]><!--><link rel="stylesheet" href="abc.css" type="text/css"/><!--<![endif]-->
<!--[if (IE 7)|(IE 8)]><link rel="stylesheet" href="/presentation/legacy-ie-14.7.1.min.css" type="text/css" media="screen,print" /><![endif]-->
<div id="content" class="article">
<div class="centerr"><div class="text"><h2 class="contact">TEXTTTTEXTTT</h2>
TEXTTT <br>
TEXTTT <br>
<br>
<h2 class="contact">TEXTTT</h2>
<a href="mailto:info@TEXTTTT.nl?subject=Verzoek om informatie">TEXTTTT</a><br>
TEXTTT<br>
TEXTTT<br>
<h2>TEXTTT</h2>
TEXTTT<br>
TEXTTT<br>
<br>
<br>
<i>TEXTTTTEXTTTTEXTTT</i><br></div>

<div class="iframe"><iframe frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?q=Imkerstraat%2010%2C%20Berkel%20en%20Rodenrijs%2C%20Nederland&key=AIzaSyD5wvbGVXfDjEJ5Dvw_c52UCnGmu81UPkI"></iframe>
</div></div>
</body>
</html>

CSS:

.text {
    float: left;
}
.iframe {
    float: left;
    width: 40%;
    height: 80% !important;
}
.centerr {
    height: 100%;
    width: 100%;
}
iframe {
    width: 100%;
    height: 100%;
}
Thomas Pereira
  • 239
  • 1
  • 4
  • 18
  • 3
    A height in percent needs to have an explicit height set on the parent element, otherwise it won’t work. – CBroe Feb 16 '15 at 16:52
  • EDIT: I see it is written in a other question, but I can`t find a solution so far.. So my question is what should be a proper solution for my problem? – Thomas Pereira Feb 16 '15 at 19:44
  • Well, as said, for a percentage height to work, the parent element must have an explicit height set. If you want that to be in percentage as well, then the same applies for _that_ element’s parent, and so on. So you could set a percentage height for all ancestors up to the `html` element – but if that results in what you want, is doubtful. _What_ you actually want however, you did not even specify clearly. So I suggest you create another question – _if_ proper prior research into what you want to achieve doesn’t yield a solution. – CBroe Feb 16 '15 at 19:51

0 Answers0