Custom css

Post Reply
lodria
Master Bludit
Posts: 54
Joined: Wed Jan 29, 2020 8:32 pm

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
Ssr. Bludit
Posts: 20
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: 2083
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
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>
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
lodria
Master Bludit
Posts: 54
Joined: Wed Jan 29, 2020 8:32 pm

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: 2083
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
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 125 times
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
lodria
Master Bludit
Posts: 54
Joined: Wed Jan 29, 2020 8:32 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.
User avatar
Edi
Site Admin
Posts: 2083
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
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.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
Post Reply