====== Web Development Lesson 3 - Tablas ======
===== Padding and Display =====
==== Objective ====
In this activity we'll adjust the spacing between cells and within cells to make it more readable. We'll also look at various display options used to position elements in relation to each other.
==== Setup ====
* Continue using your [[https://jsfiddle.net|jsfiddle]] with your code from the previous activity. It should look like this.
**HTML**
**CSS**
Name
Surname
Nationality
Age
Position
David
Ospina Ramírez
Colombia
33
Portero
Carlos
Eccehomo Cuesta Figueroa
Colombia
22
Defensa
Juan Guillermo
Cuadrado Bello
Colombia
33
Centrocampista
Radamel Falcao
García Zárate
Colombia
35
Delantero
td, th {
border-width: 1px;
border-style: solid;
}
==== Padding ====
* Padding is the space between the element (in this case the text) and the border.
* Let's add 10 pixels around each side of the text in data cells.
* Because we only want to apply the padding to the data cells and not the header cells, we have to create a new target in the CSS code.
td {
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
padding-bottom: 10px;
}
==== Collapsing Borders ====
* Personally, I don't like the space between the table cells, so I like to remove it.
* Apply the border-collapse property to the