spaces between several items in one view. MVC

0

from a foreach I send several items of the model to my view, and they show me without problem, but I am looking for them to be placed with considerable spaces.

My code:

 <tr>
    @if (Model != null)
    {
        foreach (var item in Model)
        {
            <td> <label> <strong> @item.Name </strong>  </label> </td>
        }
    }
</tr>

as the view looks

Load Availability Assign Chair Student Finished

I want to have more space between "Load availabilities" "Assign student chair" "Finished"

    
asked by Drz 21.12.2016 в 16:52
source

1 answer

0

Do not try to do it with blank spaces in the HTML code, do it with CSS. Example:

.mi-tabla td {
  padding: 0 20px;
}
<table class="mi-tabla">
  <tr>
    <td>Cargar Disponibilidades</td>
    <td>Asignar Silla Estudiante</td>
    <td>Terminado</td>
  </tr>
  <tr>
    <td>1</td>
    <td>2</td>
    <td>3</td>
  </tr>
  <tr>
    <td>Primer Item</td>
    <td>Segundo Item</td>
    <td>Tercer Item</td>
  </tr>
</table>
    
answered by 21.12.2016 в 17:48