Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How important is reset ?

Featured Replies

Hi!

 

I would like to know if reset the default browser values is a "must" and how do you do this ?

 

I saw a lot of reset codes.. but some are too complete :-)

 

Bests!!

You don't have to use them at all, it depends how you like to work and develop. Everyone who uses resets has their own techniques and methods, some will write 1kb's worth of reset styles, others will simply do * {padding: 0; margin: 0;}

To be honest - I never use global resets - and only tend to use resets on the bits which need changing when I come to coding them. However, it can save you a lot of time as you wont need to try to find why your page isn't loading correctly (when really it's down to a simple default margin/padding setting in the browser).

I always start my .css files with this (I believe it's from a guy called eric mayer and is known as the meyer reset).

 

/*=============TOTAL RESET=================*/

html, body, div, span, applet, object, iframe,

h1, h2, h3, h4, h5, h6, p, blockquote, pre,

a, abbr, acronym, address, big, cite, code,

del, dfn, font, img, ins, kbd, q, s, samp, sub, sup, tt, var,

dl, dt, dd, ol, ul, li,

fieldset, form, label, legend,

table, caption, tbody, tfoot, thead, tr, th, td {

margin: 0;

padding: 0;

border: 0;

outline: 0;

font-weight: inherit;

font-style: inherit;

font-family: inherit;

vertical-align: baseline;

}

/* remember to define focus styles! */

:focus {

outline: white dotted 0px;

}

body {

}

ol, ul, li{

list-style: none;

}

/* tables still need 'cellspacing="0"' in the markup */

table {

border-collapse: separate;

border-spacing: 0;

}

caption, th, td {

text-align: left;

font-weight: normal;

}

blockquote:before, blockquote:after,

q:before, q:after {

content: "";

}

blockquote, q {

quotes: "" "";

}

 

/*=============END TOTAL RESET=================*/

 

I find that this way my site is more consistent across browsers. There are many opinions on the pro's and cons of using a css reset. At the end of the day, it's a matter of preference for you. If memory serves me correctly there is a good article on mondaybynoon discussing this exact topic.

I can't say enough of Eric Meyer's reset, you should really use it. While you'll have to add margins and paddings for every element that you'll have to use eventually, it makes those settings consistent across all browsers so you'll have very few problems when it comes to layout and alignment issues between browsers like FF and IE. So in the long run it is definitely worth it.

 

And using * also targets your forms and resetting paddings and margins there is not really necessary.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.