0

How can I style a random post ID in css?

Example:

article#post-1825 {padding:10px;}

I want to style this for every post ID (1825, 1826, 2202, etc.).

bpy
  • 1,150
  • 10
  • 27
  • can you use scss? – Nexo Aug 10 '22 at 14:06
  • Are all of the post-xxx using `article` tag and nothing else uses them? should be targeted with a class if possible – Huangism Aug 10 '22 at 14:08
  • "I want to style this for every post ID" Every post ID? Or a single random instance of post ID? You can select everything beginning with `#post-` with CSS, but selecting "randomly" isn't possible. – DBS Aug 10 '22 at 14:08
  • 1
    use [id^=post-]{//your css} – Nexo Aug 10 '22 at 14:12

0 Answers0