user642178
user642178

Reputation:

CSS. Fixed vertical divs align

If do not use width: 270px; all <div class="top-results"> align horizontally, but I need every div on new line. How is it possible to replace width: 270px; in css?

<div id="top-results-wrapper">
    <div class="top-results">
        <span class="top-results-number">208</span>
        <span class="top-results-car">BMW X6</span>
        <span class="top-results-result">13.552</span>
    </div>
    <div class="top-results">
        <span class="top-results-number">209</span>
        <span class="top-results-car">SUBARU IMPREZA</span>
        <span class="top-results-result">11.263</span>
    </div>
</div>

#top-results-wrapper {
    float: left;
    width: 270px;
}

Upvotes: 0

Views: 162

Answers (1)

samccone
samccone

Reputation: 10926

here, just set .top-results to display:block

http://jsfiddle.net/samccone/46FyP/

Upvotes: 1

Related Questions