View Full Version : How to edit PHP module's CSS?
PSiggy
03-03-2014, 04:08 PM
Hi all,
I've placed PHP module on my new page. Everything within the module is working correctly, but I want to change module's CSS - remove border, change background color, etc...
And of course, I don't want to mess up the CSS of other modules. Is there a way to do this? Or at least some work-around?
Thanks,
Siggy
Lynne
03-03-2014, 05:57 PM
Unfortunately, right now the modules don't have a unique id in their code. You could probably modify the template (widget_php ?) to add it:
<div id="modulexxxx"
(xxxx would be the variable that is currently being used for data-widget-id perhaps?)
and then add css to the css_additional.css template to effect just that one module.
PSiggy
03-03-2014, 06:55 PM
Thanks for answer, that was actually good advice - it helped!
By doing this, I'm able to present my custom php files in "fullscreen" mode (visualy, the php content is not in the widget). Unfortunately, I've lost the ability to place some php widget to the sidebar, etc... (I can of course do that, but it wouldn't look good).
I noticed that you can add some custom modules via site builder, but I'm not able to edit them. Are these accessible somewhere in the AdminCP? What I'm thinking about is creating new widget and changing it so it behaves like widget_php...
EDIT: Sorry, now I looked again and understood what you really meant. Can I rely on that data-widget-id will be always unique within the whole system?
EDIT 2: OK, "data-widget-id" is not unique within the system. Is "data-widget-id" combined with "data-widget-instance-id" unique within the whole system? In other words - is it possible to create two widgets within the whole system, both with matching data-widget-id and both with matching data-widget-instance-id at the same time?
Lynne
03-03-2014, 07:18 PM
I would test it on a test site and see.
PSiggy
03-03-2014, 07:50 PM
OK, anyway - thank you for the advice. It helped quite a lot!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.