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

JavaScript

.primary question in a code challange

Hey everyone!

I cannot figure out this one:

Set the class of the first "article" element to "primary", then the next "article" with "secondary" and the last with "tertiary"

I have

/* mwuSlider */
.wmuSlider {
    position: relative;
    overflow: hidden;
}
.wmuSlider .wmuSliderWrapper .primary article  {

    position: relative;
    text-align: center;
}
.wmuSlider .wmuSliderWrapper .secondary article img  {
    max-width: 100%;
    width: auto;
    height: auto;
}

/* mwuGallery */
.wmuGallery .wmuGalleryImage {
    position: relative;
    text-align: center;
}
.wmuGallery .wmuGalleryImage img {
    max-width: 100%;
    width: auto;
    height: auto;
}

/* Default Skin */

.wmuSliderPagination {
    z-index: 2;
    position: absolute;
    left: 20px;
    bottom: 10px;
}
.wmuSliderPagination li {
    float: left;
    margin: 0 5px 0 0;
    list-style-type: none;
}
.wmuSliderPagination a {
    display: block;
    text-indent: -9999px;
    width: 10px;
    height: 10px;
  background: black;
}
.wmuSliderPagination a.wmuActive {
  background: blue;
}

/* Custom Styles */
#container {
  width:80%;
  height: 100px;
  display:block;
}
#container .tertiary article  {
  width:100px;
  height:100px;
  color: white;
 }

.primary {
  background: red;
}

.secondary {
  background: green;
}

.tertiary {
  background: blue;
}

1 Answer