• Resolved neelmodi

    (@neelmodi)


    Hi everyone

    I’d like to override the style for lists in twnetysixteen with a left margin. I added this to my child theme stylesheet:

    ul, ol {
    	margin-left:2em !important;
    }

    but it won’t take. I want this universally set so I don’t want to have to include specific classes or id’s.

    Any ideas how to do this?

    Thanks

    Neel

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can you post a link to your site?

    Thread Starter neelmodi

    (@neelmodi)

    Of course, it’s https://neelmodi.com

    and this a post where I’m using lists: https://neelmodi.com/facilities-management-year-in-review/

    Thanks!

    • This reply was modified 8 years, 5 months ago by neelmodi.
    • This reply was modified 8 years, 5 months ago by neelmodi.

    You’ve got the wrong syntax in your child theme’s stylesheet. You’ve got

    ul.entry-content, ol.entry-content { ... }

    which means “any <ul> or <ol> tag with the class ‘entry-content'”, which isn’t what you want. Instead, you want to use

    .entry-content ul, .entry-content ol { ... }

    which means “any <ul> or <ol> tag that’s contained within any tag with the class ‘entry-content'”

    Thread Starter neelmodi

    (@neelmodi)

    Oh, silly me. I was actually working with a different version of the stylesheet, saving it, and then uploading the old one. I’ve since deleted the old copy of the site, and it turns out that in fact

    ul, ol {
    	margin-left:2em !important;
    }

    works just fine.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CSS for lists’ is closed to new replies.