• Willem 2

    (@willem-2)


    I want to add a code in the style.css of my child theme that automatically adds an extra space after the number and the point of an (unordered and ordered) list. Current situation 1.test This should be 1. test

    Can someone help me with the complete code that I can put in the style.css?

    • This topic was modified 5 years ago by Steven Stern (sterndata).
    • This topic was modified 5 years ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hugh Lashbrooke

    (@hlashbrooke)

    Could you please send a URL of a page showing a list that is not displaying as you want it to? That would be very helpful in working out the best solution here.

    ronaldvw

    (@ronaldvw)

    Hi,

    I already responded to this yesterday in the NL forums here: https://nl.www.ads-software.com/support/topic/css-voor-opsommingslijst/

    Hugh Lashbrooke

    (@hlashbrooke)

    Hi Willem,

    I see what you mean. It looks like there’s   appearing in front of that first line item. In HTML   denotes a space character, so that’s why the browser is showing a space there and it also means the fix here does not involve CSS.

    This could either be coming from your theme in some way, although that seems unlikely to me, or you are inserting a space before the first item in the list. Perhaps you copy/pasted the list from elsewhere and you didn’t notice there is a space included?

    Of course, this may be a plugin or theme conflict. To diagnose that issue, you can disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    ronaldvw

    (@ronaldvw)

    Hi,

    so what I mentioned in my reply was that setting padding-left on the list item will increase the space.

    The most basic way is to use:

    ul li {
      padding-left: 5px;
    }

    You can add that code to your child themes stylesheet, or via wp-dashboard > Appearance > Customizer: Additional CSS. (NL: Weergave > Customizer: Extra CSS)

    See also: https://vanweerd.com/screenshots/s20191118171806.jpg

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘css extra space in list’ is closed to new replies.