Join Laurie Burruss for an in-depth discussion in this video Overriding the default browser styles, part of Creating a CSS Style Guide: Hands-On Training.
- View Offline
Because the browser's default style sheets will automatically add margins and…padding, setting the margins and padding to zero is a way to strip out the…browser styles. This practice is called zeroing out. A number of ways exist to…zero out an HTML document. The main idea here is that you want the styles you…create to style the page, not the browser's default style sheets.…In order to do this, let's go over to the CSS Style panel and select the body,…td (table data), th (table header) tag. We can style the properties for…this tag right down here in the bottom of the CSS panels. I'm going to make it…just a little bit longer so we can see what we're doing.…
Select the Add Property by clicking on it and type in the word margin, Tab, and…that will put you into the value area. Type 0px for zero pixels. Remember…we're using shorthand so putting in 0 here will apply to the top, bottom, left…and right. Tab. That will let us add another property. Let's type in padding.…Tab again, and again type 0px. Click anywhere outside this document and now…
Download the exercise files from the Exercise Files tab.
- Planning a site from a blank file
- Creating and editing a style guide with just HTML
- Using the Property Inspector for text markup
- Inserting images, tables, and footers for a custom look
- Creating and editing an external CSS style sheet
- Building a custom color palette for a site
- Testing web pages in various browsers
- Styling tips for professional sites