Created
July 12, 2012 22:21
-
-
Save mynameispj/3101465 to your computer and use it in GitHub Desktop.
512 Pixels Linked List CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2 class="entry-title"> | |
<a href="web.html"> | |
The title of an awesome post | |
<span class="glyph" href="web.html">»</span> | |
</a> | |
</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.entry-title span.glyph { | |
margin-left: 10px; | |
padding: 10px 11px 10px 9px; | |
background: #E2E2E2; | |
height: 20px; | |
width: 20px; | |
line-height: 10px; | |
border-radius: 75px; | |
margin-top: 5px; | |
position: absolute; | |
} |
In most cases, yes. However, in this case, if the glyph was an "inline-block" element, it could be pushed down onto a line all by itself if the title was the right length, and that looked silly and unacceptable. Position: absolute; prevents the glyph from being pushed to its own line.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is what "display: inline-block;" is for.