andy007 andy007 - 1 month ago 9
CSS Question

some space beetwen spans

I want to add some space beetwen two spans. Margins and paddins dos't work. How can I do that?

<a href="some.action>

<span style="display: block; width: 460px; height:55px">

<span style="float:left">
<img src="uploads/image.jpg" />
</span>

<span style="float:left">
<span style="color:#286c9b">name</span>
<br/> <!-- Нow make this space bigger? Margins and paddins does not work.-->
<span>other name</span>
</span>

</span>
</a>

Answer

Just add display:block to the span you want to add the margin to:

<span style="float:left">
    <span style="color:#286c9b; display:block; margin-bottom:20px">name</span>
     <br/> <!-- Нow make this space bigger? Margins and paddings don't work.-->
      <span>other name</span>
</span>