Hi togehter,
I would like to style an image I added to a text-block with the css-class function. I’m using Enfold as a child theme. So first I entered the class name “ownpic” at the picture-details area on the field “css-class”. After saving it I entered the following code to my style.css:
.ownpic img {
border: 0px !important;
background: transparent !important;
}
But the picture does not change styles, background stays white. I tried .gif and also .png files. At the advanced layer slider the picture is correctly shown with a transparent background. Other styles don’t work too, like e.g.
.ownpic img {
border: 10px !important;
}
I also tried
.ownpic {
border: 0px !important;
background: transparent !important;
}
and
img .ownpic {
border: 0px !important;
background: transparent !important;
}
But all these codes won’t work. What did I do wrong?
Greetings, Andreas
Hi dreamworker80!
can you please provide us a link showing the image in the text block? so we are able to give you some precise CSS code.
Cheers!
Andy
Hey!
You can use your custom class like this:
.windrad {
border: 10px solid red !important;
}
Regards,
Rikard
Thanks, that works. But the other picture has still got a white background.
I tried lots of codes, but they all don’t work. Is there another solution?