1

The website I'm trying to code on Wordpress suddenly indents the first line in of li in an ul and/or ol. I know the text-indent: -1em; is causing it but I have no idea how to get rid of it.

Google Chrome shows me this

The master Stylesheet shows no signs of having a text-indent and I tried to override it by setting the text-indent: 0; but that didn't work.

Paolo Forgia
  • 6,572
  • 8
  • 46
  • 58
Linny
  • 11
  • 2
  • Welcome to SO please take a tour of the [help centre](http://stackoverflow.com/help) to see [how to ask a good question](http://stackoverflow.com/help/how-to-ask). We cannot help you if you do not provide any code - see how to create a [MCVE] – Pete May 23 '17 at 14:09
  • Little tip, if you are using a decent browser (not ie or edge - they have them but not very good ones), you can right click and inspect element and then see what is effecting the element you are looking at and then play around with those properties to see what is causing your problem, my guess would be margin or padding – Pete May 23 '17 at 14:12
  • That CSS come from `style` attribute against the `ul` element, so you would need to use higher importance rule, something like `.my-element > ul { text-indent: 0}` – Morpheus May 23 '17 at 14:16
  • Your screenshot shows that this comes directly from a `style` attribute set on the element, and not just from a CSS rule that gets applied. So it is either there from the start (`
      ` in template), or set via JavaScript afterwards, maybe by some plugin, depending on a condition, ... If you want to overwrite it from your stylesheet, you can do that as described here: https://stackoverflow.com/a/16813221/1427878
    – CBroe May 23 '17 at 14:16
  • @Morpheus only that won’t give you higher specificity, because inline styles _have_ the highest specificity level already. – CBroe May 23 '17 at 14:18
  • @CBroe yeah, I just realised that I said nonsense :) – Morpheus May 23 '17 at 14:19

0 Answers0