CP202 Lecture 4: CSS - CSS Margins, Padding, and Borders

52 views10 pages
19 Dec 2015
School
Course
Professor

Document Summary

Look on the site for the actual images. Becoming familiar with css can be difficult given the number of properties and options available. We will start by looking at how margins, padding, and borders are related to each other, and to the content they surround. (stylesheet of examples for this page: css_marg_pad_bor. css) First, a reminder of what the css box model looks like: Margin: a transparent area set between one element and the next. Padding: the spacing between the element content and its border. Width: the width of an element is defined by the width of its content, not of its margins, borders, or padding. We will create a number of examples to demonstrate the relationships between margins, padding, borders, and the content they surround. (all quotes for these examples come from winston churchill. ) We will start with two simple paragraphs which have their margins and padding set to: the css and html codes are:

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents