html - How can i make two spans be in the same line with 'display:block' on -


i've got following column header , want displayed following

known allergies peanut ace... 

ie line shortned ellipses.

my code works puts 1 span underneathe other when add display:block style.

it displays this

    known allergies 

peanut ace...

how can display in same line

<th border="0" >     <span width="100%" onclick="dropdownresize()" style="padding-top:2px; white-space: nowrap; font-weight:normal;">&nbsp;         <i>known allergies </i>&nbsp;</span>     <span id="allergiesspan" style="white-space: nowrap; display: block ; overflow: hidden;      text-overflow: ellipsis; width:50%;">      <b>peanut, aceti test test test tes test</b>&nbsp;</i></span>        </th> 

you float: left; part has display: block;

<th border="0" >     <span width="100%" onclick="dropdownresize()" style="padding-top:2px; white-space: nowrap; font-weight:normal;">&nbsp;         <i>known allergies </i>&nbsp;</span>     <span id="allergiesspan" style="white-space: nowrap; display: block ; float: left; overflow: hidden;      text-overflow: ellipsis; width:50%;">      <b>peanut, aceti test test test tes test</b>&nbsp;</i></span>        </th> 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -