CSS into an entity, via JS / PHP code

Ask your questions here.
Post Reply
User avatar
facciolini
Posts: 73
Joined: 04 Nov 2018, 14:39
Name: Rosetta Facciolini
Location: Treviso

CSS into an entity, via JS / PHP code

Post by facciolini »

Hello everyone,
is it possible to insert CSS into an entity, via JS / PHP code?

Thanks for help
eddydeniro
Posts: 174
Joined: 23 Feb 2021, 16:31
Name: Edi Supriyadi
Location: BDG Indonesia

Re: CSS into an entity, via JS / PHP code

Post by eddydeniro »

The term "into an entity" is little ambiguous.
I think the best way to insert CSS script is via custom CSS or Custom HTML.
However, you can also modify the styling of form or item page via JS, as long as you know the element selector.

Code: Select all

$('some_selector').css('some_property', 'some_value');
You can echo CSS script with PHP code, but I'm not sure it will be effective since PHP is server-side language.
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

Re: CSS into an entity, via JS / PHP code

Post by Didou12 »

Yeah. It depends on what you want to do. You can adjust CSS in custom CSS if you have custom tag for example or as said previously with JS.
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
Post Reply