Skip to content

Instantly share code, notes, and snippets.

@arieljatib
Last active August 26, 2015 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arieljatib/68123b74cf615e270793 to your computer and use it in GitHub Desktop.
Save arieljatib/68123b74cf615e270793 to your computer and use it in GitHub Desktop.
Comment List w Horizontal Rule-like Heading

Comment List w Horizontal Rule-like Heading

The Markup

<div class="comment-label">Comments</div>
<ul class="comment-list">
  <li>Cool comment</li>
</ul>

The Styles

.comment-label {
	background-color: white;
	color: gray;
	font-size: 13px;
	margin: 0 auto;
	position: relative;
	text-transform: uppercase;
	text-align: center;
	top: 16px;
	width: 100px;
}

ul.comment-list {
	list-style: none;
	margin-bottom: 20px;
	& li {
		margin-top: 25px;
		padding: 5px 10px 20px;
		border-bottom: 1px gray dotted;
		&:first-of-type {
			margin-top: 5px;
			padding-top: 15px;
			border-top: 6px gray solid;
		}
		&:last-of-type {
			border-bottom: none;
		}
	}
}
@arieljatib
Copy link
Author

Preview

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment