CSS Reset

The term “reset” in CSS means, reseting all the extra styles to zero, in another word it is used to reset the browser default styles.

This concept was first introduced by Eric Mayer’s Reset CSS

Scenario

By default Firefox browser adds a space in between the two block level elements, however by default that space doesn’t exist in Internet Explorer.

Solution

*{
   padding: 0;
   margin: 0;
}

In above solution, using the universal selector (*) on top of the CSS file, will select all the elements and give them 0 values for margin and padding.

More Reset

*{
   box-sizing: border-box;
}

body,
button,
input,
textarea,
select{
    font: 300 16px Arial;
    color: #212121;
}

a{
   text-decoration: none;
}

ul, ol{
   list-style: none;
   margin: 0 0 0 1rem;
   padding: 0 0 0 1rem;
}

table{
   border-collapse: collapse;
}

th{
   text-align: left;
}

td{
   vertical-align: middle;
}
Tags: CSS Reset