0

I need to override theme style in a very specific place. I don't want to rewrite the theme.

Is there a way to use class and id name ins style tag in html body, like this?

<div dir="ltr" style=".wp_the_content ul li:before {left: 0 !important;right: auto !important;transform: rotate(180deg) !important;}">
matisa
  • 497
  • 3
  • 25
  • no, the style attribute inside an element allows to only define the style to the element itself – Fabrizio Calderan Apr 17 '19 at 11:40
  • Why don't you create that css rule in a custom css file, or in a ` – Maxi Diaz Apr 17 '19 at 11:41
  • What are you trying to achieve? You can use ``, but I don't recommend it because it's hard to maintain the project with those internal stylesheets. – Pavel Třupek Apr 17 '19 at 11:42
  • I just need to override this setting for one post. – matisa Apr 17 '19 at 11:43
  • @matisa than you should add some class to the post and set those css attributes to this class... – Pavel Třupek Apr 17 '19 at 11:45
  • You all are right. The thing is that it's a multi site with a bit complex code. Altering it will mean hours of QA. Hoped there's a hack that can let me override just one div. I need it for one post. – matisa Apr 17 '19 at 11:48
  • @Quentin you have marked my question as duplicate. Can you reference the original? I did not find such a hing. – matisa Apr 17 '19 at 11:49
  • @matisa — Look at the big yellow box at the top of the page. (Or the first word of fcalderan's comment which sums it up neatly). – Quentin Apr 17 '19 at 11:50
  • @Quentin just saw it. Tnx. Didn't show when I wrote the comment. Should I delete this Q? – matisa Apr 17 '19 at 11:51

0 Answers0