ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

unwanted bullets in list

November 16, 2008 3:19pm

Subscribe [2]
  • #1 / Nov 16, 2008 3:19pm

    c_k

    98 posts

    I am trying to display my categories, and it is showing up as a bulleted list. I don’t want any bullets but just a plain list with one after another. I can’t find anything in the style sheet which is referring to the categories. How can I get rid of this list?

    here is my code:

    {exp:weblog:categories weblog="resources"}
    <a href="http://{path=resources/index}">{category_name}</a>
    
    {/exp:weblog:categories}
  • #2 / Nov 16, 2008 3:50pm

    aircrash's avatar

    aircrash

    293 posts

    You can either add style=“linear” to your categories tag, which will not add any html to your code, or you can leave the code as is, and remove the bullets with css: ul { list-style-type: none; }

  • #3 / Nov 17, 2008 11:34am

    Avril's avatar

    Avril

    98 posts

    U should make a list in your hmtl code:

    {exp:weblog:categories weblog="resources"}
    
    <ul class="list">
    
    <li><a href="http://{path=resources/index}">{category_name}</a></li>
    
    </ul>
    
    {/exp:weblog:categories}

    CSS code:

    .list ul {list-style-type: none;}
  • #4 / Nov 17, 2008 1:18pm

    vosSavant's avatar

    vosSavant

    380 posts

    It’s better to have the <ul> tags outside of the weblog tags, otherwise you’ll have this for every entry in your blog:

    <ul class="list"><li>..content..</li></ul>

    Instead of this:

    <li>..content..</li>

    And the CSS should read:

    ul.list { list-style-type:none; }
  • #5 / Nov 17, 2008 2:43pm

    aircrash's avatar

    aircrash

    293 posts

    By default, the categories tag creates the HTML for the list automatically. It will output your list of categories as an unorderd list with an id of “nav_categories”. If this is what you want, there is no need to create the list html yourself, as suggested above. To get rid of the bullets, simply add

    ul#nav_categories { list-style-type:none; }

    to your css.

    If you DON’T want your categories to be formatted as a list (perhaps you want each category wrapped in a or <div> or whatever), add style=“linear” to your categories tag:

    {exp:weblog:categories weblog="resources" style="linear"}
    <a href="http://{path=resources/index}">{category_name}</a>
    
    {/exp:weblog:categories}

    This won’t add any html that isn’t specified in your template.

  • #6 / Nov 17, 2008 6:22pm

    vosSavant's avatar

    vosSavant

    380 posts

    Ahh, I didn’t notice we were using the categories tag. I was referring to the exp:weblog:entries tag in my previous post.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases