I'm trying to create a box with a left arrow/triangle which has a opaque border surrounding it. I'm using CSS3 in order to avoid using images. The box will contain dynamic content so the height will likely vary. In the image attached you can see my progress on the left and what I am trying to achieve on the right.
Here is a JSFiddle of what I have so far.
As you can see there are 2 problems:
1) Due to the opacity you can see the border surrounding the triangle overlaps the border surrounding the box. This needs to be avoided.
2) I need the arrow/triangle to be rather large, which means the right side of the arrow/triangle is equally as large and overlaps the box thus obscuring content, you can see this in the JSFiddle link and image attached.
Need some help and pointers! Thanks in advance.
.map_infobox {
margin: 30px 0 0 30px;
position: relative;
background: #FFF;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
width: 250px;
height: 250px;
border-opacity: 0.3;
border: 5px solid rgba(0, 0, 0, .3);
-webkit-background-clip: padding-box; /* for Safari */
background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */
}
.map_infobox:before{
content: "";
position: absolute;
top: 50%;
left:-21px;
z-index: 1;
height:30px;
width:30px;
margin-top: -15px;
background:#FFF;
transform:rotate(45deg);
-ms-transform:rotate(45deg);
-webkit-transform:rotate(45deg);
border-opacity: 0.3;
border-left: 5px solid rgba(0, 0, 0, .3);
border-bottom: 5px solid rgba(0, 0, 0, .3);
-webkit-background-clip: padding-box; /* for Safari */
background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */
}
<div class="map_infobox">
<div class="title">
Title goes here
</div>
<div class="copy">
Nam nibh dolor, luctus eget lorem tincidunt, egestas scelerisque erat? Morbi consequat auctor ipsum, eu ultricies nisl aliquam venenatis. Fusce feugiat posuere lectus at dictum. Integer sagittis massa justo, sed pretium ante hendrerit eget.
</div>
</div>