I feel like this is something that should be an easy fix, but I'm stumped. I'd like to have each item in the list separated (inline) by a "list-block", but I can't get the blocks to show up using anything other than div tags, which automatically jump to a new line. I would just use HTML symbols (like below), but I want CSS customization. Thanks in advance!
Fiddle: http://jsfiddle.net/sos12/UwsFL/
CSS:
.list-block {
width: 1%;
height:0;
padding-bottom: 1%;
-moz-border-radius: 1%;
-webkit-border-radius: 1%;
border-radius: 1%;
background: black;
}
Tags:
<h2>
Apples
<i class="list-block"></i>
Pears
<div class="list-block"></div>
Peaches
<span class="list-block"></span>
Plums
<a class="list-block"></a>
Grapes
</h2>
HTML symbols:
<h2>
Apples
♦
Pears
♦
Peaches
♦
Plums
♦
Grapes
</h2>
If you want the elements to be on the same line and have the attributes of a block element (such as a div), you have to use
display: inline-block
. You can then usemargin
to control the spacing between them.:If you want to rotate the elements to make them diamonds, just use a transform (note that this is CSS3 and is not supported in really old browsers):
JSFiddle