Article

a small article view

by Florin Pop

HTML

<div class="article">
    <p>1</p>
    <div class="content"> <a href="#"><h3>Title 1 goes here</h3></a>

        <p>Date 1 of creation</p>
    </div>
</div>
<div class="article">
    <p>2</p>
    <div class="content"> <a href="#"><h3>Title 2 goes here</h3></a>

        <p>Date 2 of creation</p>
    </div>
</div>
<div class="article">
    <p>3</p>
    <div class="content"> <a href="#"><h3>Title 3 goes here</h3></a>

        <p>Date 3 of creation</p>
    </div>
</div>
<div class="article">
    <p>4</p>
    <div class="content"> <a href="#"><h3>Title 4 goes here</h3></a>

        <p>Date 4 of creation</p>
    </div>
</div>
<div class="article">
    <p>5</p>
    <div class="content"> <a href="#"><h3>Title 5 goes here</h3></a>

        <p>Date 5 of creation</p>
    </div>
</div>

CSS

* {
    padding:0;
    margin: 0;
}
.article {
    border-radius:30px;
    border:1px solid #004d4c;
    display:inline-block;
    margin:20px;
    text-align: center;
    width:270px;
}
.article:hover {
    background-color: #ccc;
}
.content a {
    text-decoration: none;
    color: #003d4c;
}
.content a:hover {
    color:white;
    text-shadow: 1px 1px black;
}
.article > p {
    background-color: #004d4c;
    border-right: 1px solid #003d4c;
    border-radius: 30px 0 0 30px;
    color:white;
    float:left;
    font-weight: bold;
    padding: 1.2em 0;
    width:50px;
}
h3 {
    margin-top: 5px;
    margin-bottom: 5px;
}
.content {
    width: 70%;
    float:left;
    display:inline-block;
}
.content p {
    text-align:center;
}