I was spending some time on a question when I came up with a funny solution but not really finalized.
See the Fiddle and try to erase the <br/>
tag.
The idea is too get the same effect (red div displayed) but without using this solution relatively horrible.
So here is my question : How do I simulate <br/>
tags with CSS or eventually Js ?
Just some more difficulty : You can't touch the wrapper.
Here's the HTML code:
<div class="wrapper">
<p>Some text and descriptions</p>
<div class="widget box-wrap">
<div class="box"><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></div>
</div>
<p>Some more text and description and some more offcourse and a bit more, and just a tiny bit more</p>
</div>
Here's the CSS:
.wrapper {
width:300px;
display:block;
position:relative;
overflow:hidden;
background-color:gray;
}
.widget {
width:300px;
height:300px;
display:block;
position:relative;
background-color:green;
}
.box {
background-color:red;
visibility:visible;
}
.box-wrap {
overflow: hidden;
height: 0;
padding-bottom: 60%;
}
.box-wrap div {
max-width: 100%;
}