2

I have this problem where in the index page to show all my articles I get a dot on the very left side:

dots on the left side

If anyone knows how to get rid of the dots all help would be appreciated. Here is the source code for the page.

   <ul class="articles">
     <% @articles.each do |article| %>
      <li class="excerpt">
        <%= sanitize(truncate(article.body, length: 250)) %>
          <div class="read-more">
           <%= link_to "Read more", article_path(article), class: 'btn btn-primary' %>
        </div>
      </li>
    <% end %>
   </ul>
approxiblue
  • 6,982
  • 16
  • 51
  • 59

2 Answers2

4

That's because you're using an <li> element, which by default comes with nasty bullet points. See this question - add this to your CSS:

ul.articles
{
    list-style-type: none;
}
Community
  • 1
  • 1
Undo
  • 25,519
  • 37
  • 106
  • 129
1

It's a bullet point, as part of a list. That makes sense, since you're rendering it in an unordered list.

If you want that to go away, it's a CSS style change in your articles class.

.articles {
    list-style-type:  none;
}
Makoto
  • 104,088
  • 27
  • 192
  • 230