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

HTML How to Make a Website Responsive Web Design and Testing Website Testing

How can I remove the bullets in CSS?

Here is my code from css, it should remove the bullets but its not working.

/****************************************
  PAGE: PORTFOLIO
*****************************************/
#gallery {
    margin: 0;
    padding: 0;
    list-style-type: none;
}
#gallery li {
  float: left;
  width: 45%;
  margin:2.5%;
  background-color: #f5f5f5;
  color: #bdc3c7
}
#gallery li a p {
  margin: 0;
  padding: 5%;
  font-size: 1.0em;
  color: #bdc3c7
}

a { list-style: none }

5 Answers

Logan R
Logan R
22,989 Points

You need to move the list-style-type: none to the li class. The bullets are part of the li class.

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

Is this what you mean? Missing the "li"?

Errol Ikalina
Errol Ikalina
353 Points

Zapp is right it should be list-style: none; you have it as list-style-type: none;

Plus me up so I can get more points.

Logan R
Logan R
22,989 Points

Except Jason Anello is also right. list-style: none is just short hand for list-style-type: none and there isn't anything wrong with using it.

Hi Rana,

You may have a problem with the id in the html then.

The css you have will remove the bullets on a list.

Double check your html: <ul id="gallery">

<div id="wrapper">
     <section> 
      <ul id= "gallery">
        <li>
              <a href="img/numbers-01.jpg">
              <img src="img/numbers-01.jpg" alt="">
              <p>Experimentation with color and texture </p>
              </a>
        </li>

        <li>
              <a href="img/numbers-02.jpg">
              <img src="img/numbers-02.jpg" alt="">
              <p>Playing with blending modes using photoshop </p>
              </a>
        </li>

        <li>
             <a href="img/numbers-06.jpg">
              <img src="img/numbers-06.jpg" alt="">
              <p>Trying to use an 80s style of glows </p>
             </a>
       </li>

        <li>
             <a href="img/numbers-09.jpg">
              <img src="img/numbers-09.jpg" alt="">
              <p>Drips created using Photoshop paintbrush </p>
             </a>
       </li>

        <li>
             <a href="img/numbers-12.jpg">
              <img src="img/numbers-12.jpg" alt="">
              <p>Creating shapes using repetition </p>
             </a>
        </li>
       </ul> 

    </section>

list-style:none;

There isn't anything wrong with list-style-type: none;

list-style is the shorthand property for list-style-type, list-style-image and list-style-position

Errol Ikalina
Errol Ikalina
353 Points

I can't zapp, I've been corrected list-style-type: none; is also valid.

Np. I just learned that list-style-type:none works.