I have this shape:
and I was wondering if its possible to create it with CSS3.
This is what I have so far (click for fiddle):
HTML:
<div id="cafeDialog" role="dialog" class="cafeDialog caspSearch" style="">
<div data-title="Search" role="main">
<div>
</div>
</div>
</div>
CSS:
html, body {
height: 100%;
}
.caspSearch {
border: 1px solid black;
background: black;
background: -moz-linear-gradient(top, rgba(128, 144, 152, 0.9) 0%, rgba(67, 74, 80, 0.91) 8%, rgba(54, 58, 61, 0.96) 91%, rgba(74, 81, 85, 0.9) 100%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(128, 144, 152, 0.9)), color-stop(8%, rgba(67, 74, 80, 0.91)), color-stop(91%, rgba(54, 58, 61, 0.96)), color-stop(100%, rgba(74, 81, 85, 0.9)));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(128, 144, 152, 0.9) 0%, rgba(67, 74, 80, 0.91) 8%, rgba(54, 58, 61, 0.96) 91%, rgba(74, 81, 85, 0.9) 100%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(128, 144, 152, 0.9) 0%, rgba(67, 74, 80, 0.91) 8%, rgba(54, 58, 61, 0.96) 91%, rgba(74, 81, 85, 0.9) 100%);
/* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(128, 144, 152, 0.9) 0%, rgba(67, 74, 80, 0.91) 8%, rgba(54, 58, 61, 0.96) 91%, rgba(74, 81, 85, 0.9) 100%);
/* IE10+ */
background: linear-gradient(to bottom, rgba(128, 144, 152, 0.9) 0%, rgba(67, 74, 80, 0.91) 8%, rgba(54, 58, 61, 0.96) 91%, rgba(74, 81, 85, 0.9) 100%);
/* W3C */
width: 500px;
height: 300px;
border-radius: 10px;
padding: 0 !important;
position:relative;
top: 30px;
}
.caspSearch:before {
content:'';
width: 0;
height: 0;
display: block;
position: absolute;
border-bottom: 50px solid white;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
}
I'm struggling with the triangle since it needs to be with transparent gradient and the black border needs to wrap it .
I made a sample for you... just add your shadows and such to this and your set :)
http://jsfiddle.net/BNgTh/
Change the top value in #talkbubble:before to make it smaller as you wish too.
Is this what you are looking for?
CSS
HTML
The Fiddle
http://jsfiddle.net/sjccN/4/