From the course: CSS: Float-Based Page Layouts (2012)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Calculating em values - CSS Tutorial
From the course: CSS: Float-Based Page Layouts (2012)
Calculating em values
Figuring out the value that you need for an element's width, height, or other physical properties is pretty simple if you use pixels. However, what if you are going to use a relative unit of measurement, like an em, or even percentages? Well, in those instances it can sometimes be tricky to accurately calculate the computed value of the element's properties. Now understanding how this works is critical to creating certain types of layouts, so it's really important for us to take a closer look at it. Now, if you remember, an em is a relative unit of measurement that is equal, 1 em is say equal to the default font size of an element. Now if you need to review what an em is or any of the different units of measurement that are available to us in CSS, be sure to go back to the CSS: Core Concepts title and review the movie on units of measurement where I talk about them in a little bit more detail. Okay, so for this example we are going to be using the em_values.htm file. You can find that…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
Box model review8m 47s
-
(Locked)
Calculating element dimensions11m 11s
-
Understanding margin collapse7m 59s
-
(Locked)
Calculating em values7m 41s
-
(Locked)
Calculating percentage values7m 51s
-
(Locked)
Normal document flow13m 3s
-
(Locked)
Controlling element display8m 53s
-
(Locked)
Using CSS Resets7m 11s
-
(Locked)
Fixed, fluid, and responsive layouts9m 9s
-
(Locked)
CSS debugging tools6m 46s
-
(Locked)
Using the Firebug Inspector and the WebKit Web Inspector11m 5s
-
(Locked)
-
-
-
-
-
-
-
-