Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add spacing between two spans

Tags:

html

css

For the code below I want add spacing between "Discount" and $500. I don't want to add additional break tag. Here's the sample on jsbin.

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Spacing Test</title>
<style type="text/css">
        .labelReadOnlyTB {
            font-size: 16px;
            font-family: Arial;
            padding: 1px;
        }
        .labelForTextbox
        {
        font-weight: bold;
        font-size: 12px;
        color: #000000;
        font-family: Arial;
        padding:8px 0px;
        margin-bottom:5px;
        }
    </style>
</head>
<body>
  <table>
      <tr>
         <td style="min-height:45px;vertical-align:top;">
        <span id="lblDiscount" class="labelForTextbox">Discount</span>
         <br />
        <span id="lblValue" class="labelReadOnlyTB">$500</span>
        </td>
      </tr>
  </table>

</body>
</html>
like image 671
gbs Avatar asked Aug 27 '13 20:08

gbs


1 Answers

If you want to add spacing in html you can also use.

&nbsp;

If you put three of these before your text, it will add 3 white spaces.

for example:

<label>&nbsp;<span>Test</span></label>
like image 160
tim Avatar answered Oct 19 '22 23:10

tim