andy007
andy007

Reputation: 917

some space between spans

I want to add some space between 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>

Upvotes: 0

Views: 143

Answers (2)

Zenon Buratta
Zenon Buratta

Reputation: 200

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>

Upvotes: 1

Majid Sadr
Majid Sadr

Reputation: 1071

span {display:inline-block; margin:10px;}

Upvotes: 1

Related Questions