WordPress.org

Ready to get started?Download WordPress

Forums

made a theme - but can't get bullets (9 posts)

  1. km
    Member
    Posted 9 years ago #

    Using another theme as an example, I customised the stylesheet and theme files to make my own design.

    However, I've got to the point where I want the sidebar to be a bullet list... however the CSS file does not have any reference to ul or li or lists.

    I have tried adding list-style-type:disc into the #sidebar { part of my stylesheet - but even with the div class="sidebar" is specified I do not get bullet points.

    Is there other staff I should add under #sidebar in the style sheet?

    Kim

  2. NuclearMoose
    Member
    Posted 9 years ago #

    "list-style-type" is used for <ul> and <ol> lists. In other words, you'd need to have:
    #sidebar ul li {
    list-style-type:disc;
    }

    to get it to work. Also, you mention div class="sidebar"...if your CSS has #sidebar, then that should be div id="sidebar".

  3. km
    Member
    Posted 9 years ago #

    Hmm, still can't get it working.
    I'm learning as I go here (haven't had much CSS experience before).

    I have put this in the stylesheet:

    #sidebar ul li {
    list-style-type:circle;
    list-style-position:outside;
    }

    I take it this means that for the ID "sidebar" any
    ul or li tags will have the circle and outside characteristics?

    If my sidebar.php file has div id="sidebar", but later has div align="left" - does that cancel out the div id="sidebar" or does it fall inside it? (eg: do I need to keep putting a new div id=sidebar every time i have used another div tag? Or can I have div tags within div tags? (just depends wher ethe closing /div is)

    Anyway, with those entered in the CSS file I still can't get the bullet points appearing.

    The website I am working on is http://www.emfacts.com/weblog/

    Kim

  4. km
    Member
    Posted 9 years ago #

    Found the problem I think.

    This was in the stylesheet:

    ul {
    margin-top: 0px;
    margin-left: 0px;
    margin-bottom: 0px;
    padding-left: 0px;

    I deleted that - and have got a little further now (it seems to have been overiding the #sidebar ul li)

    Kim

  5. km
    Member
    Posted 9 years ago #

    Ok, fixed the style sheet issue... so all of the above can be ignored, now!

    On the sidebar.php, the lists for the Categorys, Archives, Links, etc. are using this: [?php wp_list_cats('list=0'); ?] - how can I make that list come through with [li] and [/li] before and after each category? Do I have to hard code it somewhere, or can it be done through the sidebar.php or style sheet?

    Kim

  6. km
    Member
    Posted 9 years ago #

    anyone?

  7. km
    Member
    Posted 9 years ago #

    never mind - all fixed now! :)

  8. NuclearMoose
    Member
    Posted 9 years ago #

    kmaisch,

    I would like to suggest that next time, if you have a new question that requires an answer that you start a new post for it. Thanks! :)

  9. Lorelle
    Member
    Posted 9 years ago #

    wp_list_cats tag should help. I believe that the default is LI tags. You just can't see them in the code. They show up in the generated HTML page.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.