Home › Forums › CSS › Search Results Alignment › Re: Search Results Alignment
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…