I have my div inside an html like below,
<div class="mainBlock">
<div style="display: inline-block">
<span>This Text-1 may be a bit lengthy</span>
</div>
<div style="display: inline-block;margin-left:50px">
<span>This Text-2 may be a bit lengthy</span>
</div>
</div>
Here is how it looks on my UI:
It has plenty of space to expand. The problem is, if the text in first div is short, the right div gets moved towards left (which is pretty obvious)
Now, what i require is the left side div should take some fixed width so that the right div will always be positioned at some fixed location.
Please advice the changes that needs to be done.
P.S. I want to avoid giving fixed width. I tried giving width of 50% to each div, but it isn't helping much.