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 trialRandhir Rana
4,754 PointsHow 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
}
5 Answers
Logan R
22,989 PointsYou need to move the list-style-type: none
to the li class. The bullets are part of the li class.
Randhir Rana
4,754 Points#gallery li {
margin: 0;
padding: 0;
list-style-type: none;
}
Is this what you mean? Missing the "li"?
Errol Ikalina
353 PointsZapp is right it should be list-style: none; you have it as list-style-type: none;
Zapp You
3,548 PointsPlus me up so I can get more points.
Logan R
22,989 PointsExcept 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.
Jason Anello
Courses Plus Student 94,610 PointsHi 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">
Randhir Rana
4,754 Points<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>
Zapp You
3,548 Pointslist-style:none;
Jason Anello
Courses Plus Student 94,610 PointsThere 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
353 PointsI can't zapp, I've been corrected list-style-type: none; is also valid.
Zapp You
3,548 PointsNp. I just learned that list-style-type:none works.
MUZ140286 Ronald Mutsikwi
14,788 PointsMUZ140286 Ronald Mutsikwi
14,788 Pointsa { list-style: none }