The code below gives this result:
Which is very close to the result I want except three facts:
- Why is there a very odd grey area at the bottom of the picture?
- How can I make the orange div extend to the bottom of the picture? I tried
height: 100%
but it didn't work... - How can I also give a 10 pixels space between the div of the text and the picture?
Desired result:
div.div1 {
background-color: yellow;
border: 1px solid black;
padding: 10px;
overflow: auto;
}
div.div2 {
border: 1px solid gray;
float: right;
}
div.div3 {
background-color: orange;
border: 1px solid gray;
height: 100%;
padding: 10px;
}
<div class="div1">
<div class="div2">
<img src="http://splendidwillow.com/wp-content/uploads/2012/04/Allium-Purple-garlic-flowers-200x200.jpg">
</div>
<div class="div3">
Text about flowers
</div>
</div>