It seems that when an element has display:block, the background-color of that element extends to 100% of the width of the parent element (as it is intended). I would like instead for the background-color to extend only to the edge of the text, so that the parent element's background-color is visible. I would use a float or inline-block, but it is also important that each element exist on a new line.
CSS Code:
body {
background-color:#fff;
color:#1a1a1a;
font-family: inconsolata;
font-size:13px;
}
#content {
position:absolute;
width:50%;
left:25%;
top:5%;
}
.entry {
/*background-color: #1a1a1a;*/
background-image:url('images/stripe3.png');
color:#f00;
/*padding:1px;*/
}
ul {
display:block;
}
li {
background-color:#fff;
margin-left:20px;
padding: 0px 4px;
}
HTML code:
<div id="content">
<div class="entry">
<ul>
<li>
the illuminator : ongoing : projection, social practice
</li>
<li>
color organisms : 2014 : projection, net art
</li>
</ul>
</div>
</div>