CSS - How to align 2 fields into 1 row?

Posted by user1809157 on Stack Overflow See other posts from Stack Overflow or by user1809157
Published on 2012-11-16T04:42:55Z Indexed on 2012/11/16 5:00 UTC
Read the original article Hit count: 111

Filed under:
|
|

I'm newbie in css. My jsfiddle here http://jsfiddle.net/PAHdH/

<div>
    <label>Name: </label><p>John</p>
    <label>Age: </label><p>35</p>
    <label>Level: </label><p>60</p>
    <label>Score: </label><p>5000</p>
</div>

label{
    display: inline-block;
    float: left;
    clear: left;
    width: 150px;
    text-align: left;
    color:black;
}

p {margin-bottom:2px; padding:0;}

?

I would like to change to

Name: John Age: 35
Level: 60 Score: 5000

It should be like a table with 4 columns.

© Stack Overflow or respective owner

Related posts about html

Related posts about css