Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Search Results Alignment Re: Search Results Alignment

#141137
waylaid
Member

You could put the search results image and descriptions within span tags inside an li:

ul>
li>
span class=”searchResultsImage”>
span class=”searchResultDescription”>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed egestas tincidunt rhoncus. Sed ultrices sagittis fringilla. Donec placerat auctor justo bibendum bibendum. Quisque nec lacinia arcu, eu malesuada massa. Nulla a arcu mollis, euismod nulla sed, porta ligula.

Display the spans as block.

Float the_ image_ span to the left. Give it a width.

Give the _description_ span a margin-left => the width of the image span.

here’s a simplified example.
http://codepen.io/waylaid/pen/uHzIB

Edit: I had to remove brackets so code would show above… I must learn how that works…