Niklas Rosencrantz
Niklas Rosencrantz

Reputation: 26643

Align the elements in multiple rows horizontally

I'm developing a webapp that generates a list of online classifieds. Now the small image is not properly aligned if you look at the first and second elements in the list:

enter image description here

<div class="item">
    <abbr2 class="date dtstart value item_age" title="2013-05-07T12:48:07+0000">
        Today
        <br>13:23
    </abbr2>

    <a lang="" class="item_img" tabindex="1" href="/vi/5775056084926464.html">
        <img src="http://lh3.googleusercontent.com/jscy04U7d2qfgGe6PecBDv63HpzeNnIHn62_hk71A0yYM6Vdw7_OwcnaeCotDjMg4e7i07bJwdLgPhM7QlqW35HK=s65" title="Post Free Ads - List your advertisement" alt="Post Free Ads - List your advertisement">
    </a>

    <div class="item_info">
        <h3 class="item_subject">
            <a href="/vi/5775056084926464.html">Post Free Ads - List your advertisement </a>
        </h3>
        <!-- s -->
        <p class="item_teaser">Post Free Ads on top sites. ...
        </p>

        <div class="item_segments clean_links nohistory">
            <small>
                <a class="category" href="/q?query=category%3D6030+and+cityID%3D4691207+and+type%3Ds">
                    Services
                    <br>
                    For sale,
                    Madgaon, Goa</a>

            </small>
        </div>
    </div>
    <div class="item_price">
    <span class="price_span"></span>
    </div>
</div>

I created a fiddle with the problem.

Upvotes: 2

Views: 84

Answers (1)

Lu&#237;s P. A.
Lu&#237;s P. A.

Reputation: 9739

Set a width

CSS

.date{
    width: 60px;
}

DEMO HERE

Upvotes: 4

Related Questions