"Pill" with thumbnail and link I'm currently trying to display a list of movies with this pill-like elements. The code below works but I guess there is a better way or a way to use elements from the twitter Bootstrap. It also bothers me that the date in the brackets isn't centered with the heading.

Please give me feedback how you like my code. I'm always open for any improvements or ideas :)



.pillLink &gt; h {
 display: inline-block;
}

.pillLink {
 display: inline-block;
 padding-left: 20px;
}

.pill &gt; #cover {
 height: 100px;
 outline: 2px solid white;
}

.pill {
 
 padding: 7px;
 margin: 10px;
 width: 500px;
 background-color: silver;
 -webkit-border-radius: 7px!important;
 -moz-border-radius: 7px!important;
 border-radius: 7px!important;
 border: 1px solid grey
}
&lt;html&gt;
 &lt;head&gt;
  &lt;!-- Latest compiled and minified CSS --&gt;
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"&gt;
  &lt;link rel="stylesheet" type="text/css" href="pills_style.css"&gt;
 &lt;/head&gt;
 
 &lt;body&gt;
  &lt;div class="pill"&gt;
   &lt;img src="http://3dprint.com/wp-content/uploads/2014/11/int3.jpg" id="cover"&gt;
   &lt;a href="http://www.imdb.com/title/tt0816692" class="pillLink"&gt;&lt;h3&gt;Interstellar&lt;/h3&gt;&lt;/a&gt;
   &lt;span&gt;(2014)&lt;/span&gt;
  &lt;/div&gt;
 &lt;/body&gt;
&lt;/html&gt;
The id attribute must to be unique per document. So I think that using ID for the cover image is wrong under the assumption that you may have many pills per page with covers.

I believe that using a class cover would be better in this case. You can still use .pill &gt; .cover selector in the same way to only select covers under pills.