0
I’m putting together a layout using Bootstrap 3 and wanted to put together a layout more or less like this:
+-------------+---------------------------------+
+-------------+ +
+-------------+ +
+---height----+ Conteúdo aqui +
+----100%-----+ +
+-------------+ +
+-------------+ +
+-------------+---------------------------------+
And when moving to smaller screens (768px or smaller) the layout should be as follows:
+-----------------------------------------------+
+--------------height do elemento---------------+
+-----------------------------------------------+
+ Conteúdo aqui +
+ +
+ +
+-----------------------------------------------+
My difficulty is in placing the height of the element to the left (dashed) with height 100%. on large screens and, when moving to small screens, get the height of the internal content. How can I do this? Follow the code I am using.
.esquerda {
background-color: red;
height: 100%;
}
.direita {
background-color: blue;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="row">
<div class="col-sm-4">
<div class="esquerda">
Conteudo da esquerda
</div>
</div>
<div class="col-sm-8">
<div class="direita">
Conteudo da direita
</div>
</div>
</div>
It doesn’t work. I’ve tried that
– Phelipe
It didn’t work. I’m trying to adapt the code you put in but still unsuccessful.
– Phelipe
No. only on large sized screens. On mobile devices it will stay above the contents on the right.
– Phelipe
In the documentation there is a example. At the moment I’m limited to responding.
– NoobSaibot