Okay
  Public Ticket #2340350
List Style Options being overwritten
Closed

Comments

  • Matthew started the conversation

    I'm created an ordered list and changing the code so that I can set the list styling. I've done it in a text box inside a toggle panel, a standard text box outside the toggle panel, and raw html outside the toggle panel. 

    <ol style="list-style:lower-alpha">

    I can see the correct styling being previewed in the backend page editor. When I preview the page or update live the list styling is overwritten by something.

    Any help is appreciated. Best,

  •   Matthew replied privately
  •  8,992
    Tahir replied

    Hey Again,

    Seems like you got it sorted : http://prntscr.com/ro1ozk . 

    1. Please clear your cache using this guide: https://themenectar.ticksy.com/article/6226/ .
    2. If you are using WP Rocket use this guide :  https://docs.wp-rocket.me/article/108-render-blocking-javascript-and-css-pagespeed#critical-path-css .
    3. For Woocommerce caching issues see: https://docs.woocommerce.com/document/configuring-caching-plugins/ . 

    Thanks


    ThemeNectar Support Team 

  • Matthew replied

    Hey Tahir, 

    When you inspect the page the html shows that the style is "list-style: lower-alpha;" but the ordered list does not display correct. 

    The first 3 items should be lower-alpha or "a", "b", "c". See the red circles on the image. The last three items are correct and are 1, 2, 3. See the blue circle.

    The confusion might be that the text I've posted after each ordered list number contains the letters and number that should be the correct list headings.

    I need to create ordered lists with legal text so the list styles of each section must be correct. I'm going off this list below located at https://rogerwilliamsmedia.com/styling-ordered-lists-with-letters-in-wordpress/.

    • upper-alpha The marker is upper-alpha (A, B, C, D, E, etc.)
    • lower-alpha The marker is lower-alpha (a, b, c, d, e, etc.)
    • upper-roman The marker is upper-roman (I, II, III, IV, V, etc.)
    • lower-roman The marker is lower-roman (i, ii, iii, iv, v, etc.)
  •  8,992
    Tahir replied

    Hey Again,

    Add this into the Custom CSS box located in your Salient Options panel (All custom css provided is tested in the Live Browser so it will work as intended . If you cant see any changes make sure there is no red cross in the Custom CSS Box as that syntax error would cause all css below it to not show up on the Frontend):

    ol li {
        list-style: lower-alpha;
        list-style-position: outside;
    }
    ol li ol li {
        list-style: decimal;
        list-style-position: outside;
    }

    Thanks


    ThemeNectar Support Team 

  • Matthew replied

    Thanks Tahir, 

    Will I be able switch back and forth between the different styles of ordered lists on the same page? Like in the same list I'll need to use all 4 of the below styles plus the default style (1, 2, 3, 4, 5, etc.)

    • upper-alpha The marker is upper-alpha (A, B, C, D, E, etc.)
    • lower-alpha The marker is lower-alpha (a, b, c, d, e, etc.)
    • upper-roman The marker is upper-roman (I, II, III, IV, V, etc.)
    • lower-roman The marker is lower-roman (i, ii, iii, iv, v, etc.)


  •  8,992
    Tahir replied

    Hey Again,

    Yes you can style it accordingly :

    ol li {
        list-style: upper-alpha;
        list-style-position: outside;
    }
    ol li ol li {
        list-style: lower-alpha;
        list-style-position: outside;
    }
    ol li ol li ol li {
        list-style: upper-roman;
        list-style-position: outside;
    }
    ol li ol li ol li ol li {
        list-style: lower-roman;
        list-style-position: outside;
    }
    


    ThemeNectar Support Team 

  • Matthew replied

    Thanks Tahir!

    Just to be super clear though. On the same page - I can have three separate lists that use different list styles?

    List One
    1.
        a.
            A.
                i.
    List Two
    a.
        1.
            i.
                A.
    List Three
    i.
        a.
            1.
                A.

    Or can I only have the one list style per page that I enter into the custom css box?

  •  8,992
    Tahir replied

    You can style it as you wish for different lists in different columns you will have to add a extra class to that column and add that to the css selector like this.

    #list-1 ol li {
        list-style: upper-alpha;
        list-style-position: outside;
    }
    #list-1 ol li ol li {
        list-style: lower-alpha;
        list-style-position: outside;
    }
    #list-1 ol li ol li ol li {
        list-style: upper-roman;
        list-style-position: outside;
    }
    #list-1 ol li ol li ol li ol li {
        list-style: lower-roman;
        list-style-position: outside;
    }
    


    ThemeNectar Support Team 

  • Matthew replied

    Thanks again!!

    I follow the css to add and the extra class to assign. I should just have to add the different extra class names, e.g. "#list-1", into the extra class names sections on say a text box?


    Best wishes. Please take care and be safe,

  • Matthew replied

    Adding the css extra class name as follows was the only way I could get it to work:

    /* Alabama */
    .list-al ol li {
        list-style: lower-alpha;
        list-style-position: outside;
    }
    .list-al ol li ol li {
        list-style: decimal;
        list-style-position: outside;
    }
    /* Arkansas */
    .list-ar ol li {
        list-style: lower-alpha;
        list-style-position: outside;
    }
    .list-ar ol li ol li {
        list-style: decimal;
        list-style-position: outside;
    }
    .list-ar ol li ol li ol li {
        list-style: upper-alpha;
        list-style-position: outside;
    }
    .list-ar ol li ol li ol li ol li {
        list-style: lower-roman;
        list-style-position: outside;
    }

    I could not get anything to work with the extra class name as "#list-al" in the css. I had to use ".list-al". I'm not sure the difference. I watched an extra class name video on youtube and that's what they used so I tried it. Seems to be working now. Thanks,

  •  8,992
    Tahir replied

    Yes that would work as well . # represents an ID and dot represents a Class Name . 

    Best 


    ThemeNectar Support Team