WutWut
WutWut

Reputation: 1234

aligning div containing multiple divs next to a div element

I need to align article description to the right of featured image of the article. I tried using display:inline but I seem to be making some mistake.Here is an example of the problem http://jsfiddle.net/r8zx9nx5/

Upvotes: 0

Views: 38

Answers (1)

Anonymous
Anonymous

Reputation: 10216

Yous could do this like below CSS, Use display: inline-block; and vertical-align: top; to .post-description and display: inline-block; to .entry-image

JSFiddle - DEMO

CSS:

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.clear{
    clear:both;
    }
.entry-image img {
    border-radius: 15px 0px 15px 15px;
    margin-left: 5px;
}
.entry-image {
    display: inline-block;
}
.post-description {
    display: inline-block;
    vertical-align: top;
}
.entry-description {
    display: inline;
    line-height: 1;
}
.entry-time {
    height: 15px;
    top: 1px;
    margin-bottom: 5px;
    position: relative;
    font-size: 14px;
    float: left;
    clear: left;
    display: inline;
    margin: 0 auto;
    width: 100%;
}
.entry-excerpt {
    font-size: 12px;
    color: #444;
    float: left;
    clear: left;
}

Upvotes: 2

Related Questions