How to apply/create a css class on WP

[ad_1]

I only have a little experience in html/css and I’m new to wordpress, how do you make a class with a bunch of attributes for an image and then assign that class to certain images on your page? I’m a little confused on css works on wordpress. Figured this should go here and not r/css because this is specific to how it applies on WP. Sorry for posting this, it’s probably asked a lot but when I looked up my issue I got a lot of pretty general css stuff that isn’t what I’m looking for here. Thanks!

[ad_2]
1 Comment
  1. Adding a new class to elements will be trickier, because you’d need to alter your theme code. You should also create a child theme before doing this so your changes don’t get overwritten when the theme gets updated.

    However, do you really need to create a new class? WordPress themes often have a specific class or ID for every element, so you can target every element through CSS (sometimes you may need a more ‘advanced’ CSS selector like :nth-child(n) )

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer