questions

Having trouble identifying object class with inspect element

Rate this post

Ok, so it’s pretty simple actually, I have a website in wordpress and I want to change the background-image of a section only to mobile users, in order to do so, I’m using custom css. That’s the code:

@media screen and (max-width: 768px) {
.class {
    background-image: url("url-of-image");
}

The problem, tho, is that I can’t identify which class I am supposed to reference here, when I use inspect element on the site I guet this:

<div class="swiper-slide slide-align-center slide_content slide_content_layout_1 activated swiper-slide-active" style="background-image: url("https://www.eletrojr.com.br/wp-content/uploads/2020/10/Plano-de-Fundo-1.jpg"); width: 381px;">== $0

What am I supposed to write on the class ? How can I easily Identify the class that I need to work with ?

 

✔️Solution:

it’s actually easy to identify the class you need via inspect element use the cursor on tools, click on the section & in the right you’ll find a + icon to add styles to this specific class, grap the name of the class and apply your code

@media screen and (max-width: 768px) {
.class {
    background-image: url("url-of-image");
}

Leave a Reply

Your email address will not be published.

Back to top button