internet explorer - Could someone help me achieve this in CSS? -
basically want display 2 span next each other. condition first span has max-width 200px if exceeds 200px overflowed characters hidden overflow:hidden applied span. condition second span display time next first span.
the problem since ie not support (ie7, ie8) max-width feature cannot use property. there other way achieve this?
so have:
<div> <span>one</span> <--- max width 200 px <span>two</span> <--- alwats display next span 1 </div>
i want display span 2 right next span 1. adding width span 1 leave huge space between span 1 , span 2 cannot this. need expand span 1 dynamically until overflowed. , need cross browser compatible ;(
thanks.
please see if this after. works alright in ie8, have tested it.
html:
<div id="content"> <span>oneedaskdaslkdjsaldjaslkdjaslkdjldasdasdasdasdalkdnaskdnasjkdnaskjdnaskjndaskjndajksdnasjkdnkjsandkjsandkjasndkjasndjksandkjsandjkndjksandjkasndjkasndkjasndkjsnajsalkdjasd</span> <span>two</span> </div>
css:
div span{display:block;max-width:200px;overflow:hidden;float:left;margin:5px;}
Comments
Post a Comment