Adding a CSS class to an Image
-
Hello, I have a problem adding an image to a site and adding a css class to it to remove the default border and shadow in the Chateau-Theme.
Therefore I added the HTML: <img class=”dar-icon” and added thecorresponding css customization
“.dar-icon {
width: 100px;
border: none;
box-shadow: none;
text-shadow: none;
}”.
Changing the width verifies, that the class is correctly assigned to the image, but the other entries do not have an impact. I also tried border:0px; etc. etc. Nothing seems to have an effect.
The page containing the image is: http://advanceddataanalytics.net/ebooks/
Thank you for taking care,
MichaelThe blog I need help with is: (visible only to logged in users)
-
Hi Michael – try this instead, to make the CSS more specific:
.post-content .dar-icon { width: 100px; border: none; box-shadow: none; text-shadow: none; }You can learn more about CSS specificity here: https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
-
- The topic ‘Adding a CSS class to an Image’ is closed to new replies.