A Help / Chat bubble using only CSS + Unicode. No Images needed!

  • Download Gist
Help_Chat_bubble_with_css_and_unicode.html
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
<html>
<head>
<title>Help / Chat Bubble with CSS + Unicode</title>
<!--
Created by: Jordan Robert Dobson
JordanDobson@Gmail.com
http://MadeBySquad.com
http://twitter.com/JordanDobson
-->
<style type="text/css">
body{
text-align: center;
margin: 5.0em 0;
font-family: sans-serif;
color: #ccc;
}
/* Bubble Specific CSS */
.bubble{
margin: 0 auto;
}
.bubble,
.bubble em{
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
position: relative;
background-color: #eee;
}
.bubble{
width: 200px;
display: block;
box-shadow: #999 1px 1px 1px;
-moz-box-shadow: #999 1px 1px 1px;
-webkit-box-shadow: #999 1px 1px 1px;
}
.bubble em{
display: block;
padding: 1.25em;
text-align: center;
z-index: 2;
color: #333;
font-size: .75em;
font-style: normal;
}
.bubble:before{
text-shadow: #999 1px 1px 1px;
color: #eee;
position: absolute;
text-align: center;
font-size: 1.5em;
width: 1.0em;
height: 1.0em;
line-height: 1.0em;
}
.left:before,
.right:before{
top: 50%;
margin-top: -.5em;
}
.top:before,
.bottom:before{
left: 50%;
margin-left: -.5em;
}
.top:before{
content: "\25B2";
top: -.5em;
}
.bottom:before{
content: "\25BC";
bottom: -.5em;
}
.left:before{
content: "\25C0";
left: -.5em;
}
.right:before{
content: "\25BA";
right: -.5em;
}
</style>
</head>
<body>
<div class="bubble bottom">
<em>Use for help along side form elements or for other things like chat bubbles. Change the div class to top, left, right, bottom to move the position of the arrow.</em>
</div>
<p>No images needed at all.</p>
</body>
</html>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.