css - HTML with icon on left and right side -


i want create un-order list in html. each of list item, there icon on left side , icon on right side. text among 2 icons , should auto occupy available screen width. in case of long text, ellipsis. list item should this:

++++++ ++++++++++++++++++++++++++ ++++++ +icon+ + short text             + +icon+ ++++++ ++++++++++++++++++++++++++ ++++++  ++++++ ++++++++++++++++++++++++++ ++++++ +icon+ + long text long text ...+ +icon+ ++++++ ++++++++++++++++++++++++++ ++++++  ++++++ ++++++++++++++++++++++++++ ++++++ +icon+ + short text             + +icon+ ++++++ ++++++++++++++++++++++++++ ++++++ 

i tried many ways create list didn't success. please help! solution or recommends welcome.

update: need icons on separated tags, such div or img in advance.

you can use floats: demo 1

and can use position absolute: demo 2

ignore if it's not after.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -