Skip to content

Instantly share code, notes, and snippets.

@Hugosslade
Created August 6, 2011 10:33
Show Gist options
  • Save Hugosslade/1129254 to your computer and use it in GitHub Desktop.
Save Hugosslade/1129254 to your computer and use it in GitHub Desktop.
Using the \0020 character in pseudo elements
#tooltip {
position: absolute;
left: 0px;
top:0px;
height: 40px;
background: #444;
color:#fff;
margin-top:-20px;
z-index:999;
-webkit-box-sizing: border-box;
padding: 10px;
border-radius: 5px;
text-shadow: 0px 1px 0px #000;
display: -webkit-box;
-webkit-box-pack: center;
-webkit-box-align: center;
-webkit-box-orient: horizontal;
border-bottom: 1px solid #000;
-webkit-user-select:none;
cursor: default !important;
}
#tooltip:after {
content:'\0020';
position: absolute;
top: 50%;
left: -16px;
margin-top: -8px;
border: 8px solid black;
border-color: transparent #444 transparent transparent;
}
#tooltip:before {
content:'\0020';
position: absolute;
top: 50%;
left: -16px;
margin-top: -7px;
border: 8px solid black;
border-color: transparent #000 transparent transparent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment