Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Problems styling a nested list

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36674
    Swami
    Member

    I have not been successful in styling my nested list. It can be seen at: http://ocoy.org/bottomlinks-upanishads/
    The site is under construction, and requires a login:
    user: yogadev
    password: wordpress

    To summarize:

    Let me prelude this request with saying that I know virtually nothing about PHP programming (I am getting a book about PHP to learn some of the basics.)

    I have added a plugin in WordPress which allows php in posts and pages, and I found a snippet on the web which displays a list of the children of a particular page:
    Code:


      wp_list_pages('depth=2&title_li=&child_of=120') ?>

    This produces a list two deep. The problem is that, though it is an ordered list, the nested list shows as an unordered list. Also, I have tried to specify upper-roman for the list style of the first list level, to no avail. My knowledge of CSS is only minimal, and my efforts to correct the problem have been unsuccessful. Here is the CSS I have been using so far:

    #threecoldeeper {width: 750px;
    margin: auto;
    font: 12px/1.8em Arial, san-serif;
    float: left;
    }
    #threecoldeeper ol{-moz-column-count: 3;
    -moz-column-gap: 15px;
    -moz-column-width: 210px;
    -moz-column-rule: none;
    -webkit-column-count: 3;
    -webkit-column-gap: 15px;
    -webkit-column-width: 210px;
    -webkit-column-rule: none;
    column-count: 3;
    column-gap: 15px;
    column-width: 210px;
    column-rule: none;
    display: list-item;
    list-style-position: inside;
    margin-left: 14px !important;

    }
    #threecoldeeper li {list-style-type: upper-roman;
    }
    #threecoldeeper ol li{list-style-type: decimal;
    }

    Can anyone point out the error(s) of my ways?

    #96767
    Swami
    Member

    OK, I have been experimenting by trial and error with the CSS, just to see what results I get. I have succeeded in getting the nested list to show as an ordered rather than the unordered list which was being displayed originally.

    Two problems persist, though. I can either get the first list and the nested list to show as upper-roman, or as normal decimal, but I cannot get the first to be roman, and the nested one to be decimal, no matter what I try.

    The second problem, which is minor, is that at the beginning of the list, there is a one (1.) which shouldn’t be there. Maybe someone can figure a solution to these problems by viewing the CSS I have used:

    #threecoldeeper ol{-moz-column-count: 3;
    -moz-column-gap: 15px;
    -moz-column-width: 210px;
    -moz-column-rule: none;
    -webkit-column-count: 3;
    -webkit-column-gap: 15px;
    -webkit-column-width: 210px;
    -webkit-column-rule: none;
    column-count: 3;
    column-gap: 15px;
    column-width: 210px;
    column-rule: none;
    display: list-item;
    list-style-position: inside;
    margin-left: 14px !important;
    }
    #threecoldeeper li{list-style-type: upper-roman !important;
    }
    #threecoldeeper ol li{list-style-type: decimal !important;
    margin-left: 20px;
    display: list-item;
    list-style-position: inside;
    }
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.