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

Michal Janek
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Michal Janek
Front End Web Development Techdegree Graduate 30,654 Points

Style your portfolio - <ul id="gallery"> my selector does not select

Nick is explaining in video at the beginning bz assigning id="gallery" to <ul> he will start styling the images so they fit desktop type website as well. however as soon as the list dots are supposed to disappear mine remain. That means that my selector does not select it for some reason.

And, if you could assist me how do I post my CSS here so you can see it that would be helpful...

6 Answers

jared eiseman
jared eiseman
29,023 Points

No problem. G'luck :)

jared eiseman
jared eiseman
29,023 Points

What are you using for your rule in the css? Should be something like:

#gallery {
  list-style: none;
}
Michal Janek
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Michal Janek
Front End Web Development Techdegree Graduate 30,654 Points
/***********************************
GENERAL
************************************/

body {
font-family: 'Open Sans', sans-serif;
}

#wrapper {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 5%;
}

a {
text-decoration:none;
}

img {
  max-width: 100%;
}

/***********************************
NADPIS
************************************/



#logo {
text-align: center;
margin: 0;
}

h1 {
font-family: 'Changa One', sans-serif;
margin: 15px 0;
font-size: 1.75em;
font-weight: normal;
line-height: 0.8em;
}

h2 {
line-height:0.75em;
margin: -5x 0 0;
font-weight: normal;
}


/***********************************
Navigation
************************************/


nav {
text-align:center;
  padding:10px 0;
  margin: 20px 0 0;
}


/***********************************
Footer
************************************/

footer {
font-size: 0.75em;
text-align: center;
padding-top: 50px;
color: #ccc;
}  

/***********************************
Portfolio
************************************/

#gallery {
  margin: 0;
  padding: 0;
  list-style: none;
}

#gallery li {
  float: left;
  width: 45%;
  margin: 2.5%;
  background-color: #000;
  color: #000;
}



/***********************************
Farby
************************************/

/* site body farba*/
body {
background-color: #fff;
  color: #999;
  }

/*green header*/
header {
  background: #6ab47b;
  background-color: #599a68;
}

/* nav pozadie na mobile*/
nav {
background: #599a79;
}

/*logo text colour*/
h1, h2 {
color: #fff;
} 
/* links anchors */
a {
  color: #6ab47b;
}

/*  nav link biely */
nav a, nav a:visited  {
color: white;
}

/*  portfolio nav link */
nav a.portfolio, nav a:hover {
color: #32673f;
}
jared eiseman
jared eiseman
29,023 Points

try moving the list-style: none; to the #gallery li rule

Michal Janek
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Michal Janek
Front End Web Development Techdegree Graduate 30,654 Points

Nope, it is not just the list-style. This whole #gallery selector does not work. I checked the id for the <ul> and it should be the same. However I am unable to locate where is the "catch" since no rule related to that ID is affecting it (background should be black etc..) Providing mine HTML from the Course lesson

<!DOCTYPE html>
<html>
  <head> 
    <meta charset="utf-8">
    <title>Michal Janek | Prekladateľ</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic,800|Changa+One' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/main.css">
      </head>
  <body>
    <header>
       <div id="logo">
        <a href="index.html">
          <h1> Michal Janek</h1>
          <h2> Prekladateľ</h2>
        </a>
       </div>
      <nav>
        <ul>
          <li> <a href="index.html" class="portfolio">Portfolio</a> </li>
          <li> <a href="about.html" class="o-autorovi">O autorovi </a></li>
          <li> <a href="kontakt.html"class="kontakt"> Kontakt </a></li>
        </ul>
      </nav>
    </header>
    <div id="wrapper">
        <section> 
          <ul id="gallery"> 
            <li>
              <a href="img/numbers-01.jpg">
              <img src="img/numbers-01.jpg" alt="">  
              <p> Experiment 0</p>
              </a>
            </li>
            <li>
              <a href="img/numbers-02.jpg">
              <img src="img/numbers-02.jpg" alt="">  
              <p> Experiment 1 </p>
              </a>
            </li>
            <li>
              <a href="img/numbers-06.jpg">
              <img src="img/numbers-06.jpg" alt="">  
              <p> Experiment 2</p>
              </a>
            </li>
            <li>
              <a href="img/numbers-09.jpg">
              <img src="img/numbers-09.jpg" alt="">  
              <p> Experiment 3</p>
              </a>
            </li>
          </ul>
        </section>
        <footer>
            <a href="https://twitter.com"><img src="img/twitter-wrap.png" alt="twitter logo"></a>
            <a href="https://www.facebook.com/mikael.janek"><img src="img/facebook.png" alt="facebook logo"></a>
            <p>&copy; 2015 Michal Janek</p>
        </footer>
      </div>
  </body>
</html>
jared eiseman
jared eiseman
29,023 Points

so the background for your list items is not turning black either?

jared eiseman
jared eiseman
29,023 Points

try clearing your cookies and cache on your browser. I just copied your code verbatim to my local machine and it works fine (aside from images being broken obviously)