Ne Kr Ne Kr - 5 days ago 7
CSS Question

height working inline but not external css

In the botton of this Website there is a fullwidth picture with some stairs. I would like to make that around a 500px height.

It works when I set an inline height:

<section class="pv-40 ding-bottom-clear parallax dark-translucent-bg hovered background-img-4">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="testimonial" style="height: 500px;">

</div>
</div>
</div>
</div>
</section>


But when I set the height in css it is not working, and I cannot understand why?

<div class="testimonial controlHeight">

</div>


CSS

.controlHeight {
height: 500px;
}


It is a CSS document with a lot of lines CSS codes, so the document is called. I thought maybe something was overwriting, so I tried to set it at the end of the CSS document, but still not called.

Answer

You have:

controlHeight {
   height: 500px;
}

Which matches against elements named controlHeight. You want:

.controlHeight {
   height: 500px;
}

which matches elements with the class controlHeight.

Comments