Skip to content Skip to sidebar Skip to footer

Second Div No Wider Than First Div

I have this layout: https://postimg.org/image/74ioib3y7/ The rules of the game are: The container must be at least 210px wide and 85px high Row1 should be able to grow as wide as

Solution 1:

This should solve your request:

.container {
  display: inline-block;
  background: aliceblue;
  min-width: 210px;
  min-height: 85px;
  position: relative;
}

.maxim {
   position: absolute;
   width: 100%;
   max-width: 100%;
   background-color: lime;
}
<divclass="container"><header><strong>12345620</strong><span>description</span></header><spanclass="maxim">
        Lorem ipsum  Lorem ipsum  Lorem ipsum  Lorem ipsum  oposum
    </span></div><divclass="container"><header><strong>1234567890</strong><span>description and more text is here also possible</span></header><spanclass="maxim">
        Lorem ipsum  Lorem ipsum  Lorem ipsum  Lorem ipsum  oposum
    </span></div>

Post a Comment for "Second Div No Wider Than First Div"