Bacground image Question

I have a background image in the body, I added this background using CSS

I have a button added as well, there for when i try to adjyst the brightness everything in the body gets affected.

My question is, how can add a class to this specifc background image? This is thwoing me off

Hi
I don’t understand what you are trying to do.
Isn’t your image already in a class if you added it wia CSS ?
Cheers.

Ok, so the image was added using the background-image property using CSS, the class was the “body” I have a button i have styled, any changes i make to the body are impacted opacity or brightness for example,

Im assuming if i can create a class for the imgae and not just the whole body, only the background image will be afftected and not the other elements in the body.

Hope this helps.

Hey, techytony! I have read your question regarding the problem you are facing. I got to know this when I asked someone to take my online class for me To add a class to the specific background image in CSS, wrap a div around your content, apply the background image to this div, and adjust its brightness using CSS filters. This isolates the effect from other elements.

1 Like

This is exactly what I was looking for! Thank you - I do have a follow up question regarding CSS, and background images, is there a one line peice of code that will aloow the imgae to fit he screen corner to corner.

I tired background-size: cover;
Not sure extaly what size that should be to achive this, I guess im confused on the syntax as well.

Any help here, please an ty!