Transparent background = transparent images?

zattsplace
zattsplace

I was working with CSS and made all of my text boxes 75% transparent. (Like I wanted.) However, I noticed that any image that I insert also becomes 75% transparent. (Not like I wanted.)

How do I maintain the transparency of the background, and make the images opaque?

Comments

  • Kallak
    Kallak
    Posts: 1,090

    You could target the images specifically by class if they have one (ie, .[image-class-name]), or do the targeting based on the child relationship with the background container (ie, .[container-class-name] img).

    All the best,
    - Kallak
  • ragnarhawk
    Posts: 168

    I am using this CSS to make my wiki page backgrounds translucent (I think near 75%):

    body.campaign-public-layout .post-section.post-main { background-color: #e8e8e86A !important; }

    It does not appear to be making my images translucent though - is your CSS selector the same?

  • zattsplace
    zattsplace
    Posts: 9

    Thanks for the quick replies!

    Kallak, I'm going to try doing what you suggested to see how it turns out. I would assume that the img class would be the image file type? (e.g. .png)

    Honestly, Ragnar I'm not sure what you mean by CSS selector. It looks like I may have accidentally grouped the image and background CSS in some way. I'm a total amateur at this and I'm learning as I go.

  • ragnarhawk
    Posts: 168

    Can you please post your CSS for the transparency, so that we can see what differences there might be?

  • zattsplace
    zattsplace
    Posts: 9

    I'm sorry for the long delay, ragnarhawk! Y'know, life... Your bit of CSS worked for me! You rock.

    Thank you tons.

Sign In or Register to comment.

April 2024
Season of Strife

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions