Exclude an Image from the Border Styles (HTML)
You may find that you want most of your images to have borders, but there are some exceptions and these need to have no borders. Rather then set up every image border independently, you can apply borders to all images and then set your "exception" images to use different styling.
-
Set the border styles that you want to apply to those images that are to have borders. For this, follow the instructions in Borders on All Images (HTML).
-
Open a topic that contains one of the images that are to have no borders.
-
Select the
mediaobject
element for the image. -
Add the
role
attribute In theElement Attributes Panel and set its value tonoborder
. -
Select Save.
-
Use a code or text editor to create a CSS file. Give it a suitable name and save it with the
.css
extension.If you already use a custom CSS for your layout, you should edit that CSS file instead.
-
To disable borders on those images with the role you created in step 4, add this code to your CSS:
.mediaobject.noborder img { border: none; }
-
Save your CSS file and Upload Customized CSS.
When you publish with that layout, the CSS styles will be applied to your published output.