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 How to Make a Website Styling Web Pages and Navigation Style the Portfolio

David DeWeaver
David DeWeaver
3,701 Points

{SOLVED} Still getting bullet points!

I'm at the part where I've set the gallery list style and the gallery list values (float, width, color, etc) and the two column website is taking shape but there is still a bullet point before every photo. I changed the list style to none so why is this happening?

Hugo Paz
Hugo Paz
15,622 Points

Hi David,

Could you please post your HTML and CSS?

3 Answers

Damien Watson
Damien Watson
27,419 Points

Hi David,

You need to make sure you are targeting either the unordered list 'ul' or list element 'li' with the style none. Just double check which element it is applied to. So with something like:

  <div id="wrapper">
    <section>
      <ul id="gallery">
        <li>
          <a href="img/numbers-01.jpg">
            <img src="img/numbers-01.jpg" alt="">
            <p>Experimentation with colour and texture.</p>
          </a>
        </li>
      </ul>
    </section>
  </div>
/* Any of these should work, but '#gallery' is your best option because it
directly selects the desired target */
#gallery     { list-style:none; }
ul                { list-style:none; } /* though this will do all 'ul' */

You just need to make sure the 'list-style:none' is being applied to the element that has a list style to start with.

David DeWeaver
David DeWeaver
3,701 Points

Setting the ul id = "gallery" fixed my problem! Thanks!

Still not sure why I had to set the ul id to "gallery," instead of setting the section id to "gallery," which is what I had done before.

David DeWeaver
David DeWeaver
3,701 Points

Ahh, I see...so this code is wrong? What I did was to set the section id = "gallery," instead of setting the ul id = "gallery." Can you explain why that would be a problem?

<div id="wrapper"> <section id="gallery"> <ul> <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 in Photoshop</p> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Trying to Create an 80's glow</p> </a> </li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>Drips created using Photoshop brushes</p> </a> </li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Creating shapes using repitition</p> </a> </li> </ul> </section>

Hugo Paz
Hugo Paz
15,622 Points

You are using the gallery id to set the rule. In your code the id refers to a section element, you want to target the ul element.

What you can do is select the ul inside the section so your css will look like:

#gallery ul{
/*css rules here will affect the ul nested inside the section with id gallery*/
}
Damien Watson
Damien Watson
27,419 Points

It's not necessarily wrong, it just means that if you apply something to '#gallery' it is to the parent, not the child 'ul' item. You can change your css to target the child of a parent by showing both elements separated with a space, so your css would look like this:

  #gallery ul     { list-style:none; }
David DeWeaver
David DeWeaver
3,701 Points

Thank you Damien and Hugo for your helpful tips! I appreciate it.

David