JSFiddle - React, Tailwind, and code Playground

by adamschwartz

HTML

<div class="container">
    <div class="card">
        <div class="item"></div>
        <div class="description">This is a description.  It may have a lot of content in it, or it may hav none at all.</div>
    </div>

    <div class="card">
        <div class="item"></div>
    </div>

    <div class="card">
        <div class="item"></div>
        <div class="description">This is a description.  It may have a lot of content in it, or it may hav none at all. Sometimes it may even have <a class="#">links</a>.</div>
    </div>

    <div class="card">
        <div class="item"></div>
        <div class="description">This is a description.  It may have a lot of content in it, or it may hav none at all. Sometimes it may even have <a class="#">links</a>. This is a description.  It may have a lot of content in it, or it may hav none at all. Sometimes it may even have <a class="#">links</a>. This is a description.  It may have a lot of content in it, or it may hav none at all. Sometimes it may even have <a class="#">links</a>.</div>
    </div>
</div>

CSS

body {
    background: #e0e0e0;
}

* {
    font-family: "Helvetica Neue", sans-serif;
    font-size: 13px;
}

.container {
    width: 400px;
}

.card {
    width: auto;
    min-height: 120px;
    min-width: 120px;
    position: relative;
    border: 1px solid #eee;
    border-top: 2px solid orange;
    display: inline-block;
    margin: 20px;
    box-shadow: inset 0px 1px rgba(255, 255, 255, 0.24), 0px 1px 5px rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5c5b5b), color-stop(100%, #353535));
    background-color: #5c5b5b;
    border: 1px solid rgba(0, 0, 0, 0.5);
    color: #eee;
    text-shadow: 0 1px #000;
}

.item {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 100px;
    height: 100px;
    background: url(http://www.cestfait.ch/sites/default/files/placeholder.jpg);
    background-size: 100px 100px;
    border-radius: 3px;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.7)
}

.description {
    padding: 10px;
    margin-left: 110px;
}