JSFiddle - React, Tailwind, and code Playground
HTML
<div class="popular-tags">
<ul class="languages">
<li><a href="#">Bash</a></li>
<li><a href="#">Python</a></li>
<li><a href="#">PHP</a></li>
</ul>
<ul class="web-servers">
<li><a href="#">nginx</a></li>
<li><a href="#">Apache</a></li>
<li><a href="#">Lighttpd</a></li>
</ul>
<ul class="network-services">
<li><a href="#">Exchange</a></li>
<li><a href="#">WebDAV</a></li>
<li><a href="#">Backups</a></li>
</ul>
</div>
CSS
/* Sane Box Model Trick
* http://www.paulirish.com/2012/box-sizing-border-box-ftw/
*
* First lines are just standard crap any framework would have
*/
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
body {font-size:100%;}
.popular-tags ul, .popular-tags li {margin: 0; padding: 0;}
/* Generic formatting so it doesn't look entirely like ass
* Also responsive! For the most part, needs a bit more work
* like scaling the font when boxes get smaller.
*/
a {color:#FFF; text-decoration:none;}
.popular-tags {
font-family: 'Noto Serif', serif;
font-size:1.4em;
font-weight:700;
margin: 0 auto;
text-align: center;
}
.popular-tags li {
display: inline;
text-align: left;
}
.popular-tags li:first-child a {margin-left: 0;}
.popular-tags a {
display: inline-block; /* This is what allows you to use height/width on link */
margin: 0 0 5% 5%;
padding: 1% 0 12% 2%;
width:25%;
}
/* Pretty! */
.languages a {background-color: #4D99E0;}
.web-servers a {background-color: #75CC00;}
.network-services a {background-color: #E4247E;}
JavaScript
WebFontConfig = { google: { families: [ 'Noto+Serif:400,700:latin' ] } };
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();