3

Is it possible to create the following scenario using HTML or maybe HTML5 ?

In the attached image: "A" is an image overlay. "B+C" is a content zone.

At the moment i have positioned "A" using an absolute div with a background, The problem is all of "B" (the content beneath the blue)line is of course behind "A" so the data there is inaccessible.

Is there an option to overcome this issue ?

enter image description here

web-tiki
  • 99,765
  • 32
  • 217
  • 249
lior r
  • 2,220
  • 7
  • 43
  • 80

1 Answers1

2

You can make the triangle with transform-rotate so that it keeps it's boundaries and doesn't overlap the B element :

DEMO(no vendor prefixes)

.wrap{
    width:900px;
    position:relative;
    overflow:hidden;
}
.c, .b{
    width:20%;
    float:right;
    height:200px;
    background:gold;
}
.b{
    clear:right;
    height:400px;
    background:teal;
}
.a{
    position:absolute;
    top:200px; left:0;
    width:110%; height:400px;
    overflow:hidden;
    transform-origin:0 0;
    transform: rotate(24deg);
}
.a img{
    width:100%;
    display:block;
    transform-origin:0 0;
    transform: rotate(-24deg);
}
<div class="wrap">
    <div class="c"></div>
    <div class="a"><img src="http://lorempixel.com/output/people-q-c-640-480-8.jpg" alt="" />        </div>
    <div class="b"> <a href="#">link</a></div>
</div>
Community
  • 1
  • 1
web-tiki
  • 99,765
  • 32
  • 217
  • 249