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;"> <i>known allergies </i> </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> </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;"> <i>known allergies </i> </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> </i></span> </th>
Comments
Post a Comment