Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Layout Techniques Display Modes Column Layout with Inline-Block

kabir k
PLUS
kabir k
Courses Plus Student 18,036 Points

Which 'initial' values?

In the media query styling, which 'initial' values are we referring to?

@media (max-width: 768px) {
  .main-logo,
  .main-nav,
  .main-nav li {
    display: block;
    width: initial;
    margin: initial;
  }
  .main-nav {
    padding-left: initial;
  }
  ..................
}

1 Answer

Hi Kabir,

The initial keyword will set a property value back to its initial value as stated in the css specification.

Here's a handy table of css2.1 properties: http://www.w3.org/TR/CSS21/propidx.html

There's an "initial value" column among other things. This column will tell you the value that the property will be set back to if you use the initial keyword.

Some properties don't have an initial value. In those cases I think the value will be set back to the browsers default stylesheet.

kabir k
kabir k
Courses Plus Student 18,036 Points

Thanks, Jason. I thought maybe they mentioned the initial values in that video and I missed it.