Custom css

Post Reply
lodria
Master Bludit
Posts: 151
Joined: Wed Jan 29, 2020 8:32 pm
Has thanked: 27 times
Been thanked: 10 times

Hi!

I would like to ask how to add custom css when creating new content? For example, I want to set a shadow for an image, but only in the current writing. What solution is worth choosing?
lightmat
Sr. Bludit
Posts: 46
Joined: Fri Feb 21, 2020 10:53 pm

I would create my own css file, and then make my own class for that use.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

1) You can set the style with the HTML tag

You can set the style with the HTML tag using style="...":

Example:

Code: Select all

<img src="https://mydomain.com/bl-content/uploads/pages/[...]" style="box-shadow: 10px 10px 15px silver">
2) Using own class

You can use an own class as for example shadow:

Code: Select all

<img src="https://mydomain.com/bl-content/uploads/pages/[...]" class="shadow">
In addition to this you have to give the class properties. For this you can use the plugin HTML Code.

Example:

Code: Select all

<style>
   box-shadow: 10px 10px 15px silver;
</style>
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
lodria
Master Bludit
Posts: 151
Joined: Wed Jan 29, 2020 8:32 pm
Has thanked: 27 times
Been thanked: 10 times

Thanks! I will try what would be the best and easiest..
I searched ckeditor or another editor primarily for such opportunities because I write articles there, but I didn’t find anything like that in them.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

lodria wrote: Wed Sep 02, 2020 5:11 pm I searched ckeditor or another editor primarily for such opportunities because I write articles there, but I didn’t find anything like that in them.
CKEditor allows you to set the style or a classes at "Image properties" > "Advanced".

cke-image.png
cke-image.png (14.16 KiB) Viewed 2182 times
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
lodria
Master Bludit
Posts: 151
Joined: Wed Jan 29, 2020 8:32 pm
Has thanked: 27 times
Been thanked: 10 times

They work, thank you again. All I would ask is is there a way to insert a larger css? Not one line, but more.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

lodria wrote: Thu Sep 03, 2020 5:06 pm They work, thank you again. All I would ask is is there a way to insert a larger css? Not one line, but more.
In this case I would use classes. It's better to separate the content from the styling, and easier to have all CSS in one place.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply