Customization > Themes and Graphics

custom styling of HTML Block

(1/1)

ncoded:
I stumbled upon this way of styling my custom HTML blocks: I write up a custom .css file to my liking and load it from within the <head>.

This way, the content of each block (not the block itself) gets its own styling. One advantage of this approach, in my opinion, is that it does not interfere in any way with other styling (such as index.css, portal.css) and that makes for an easy upgrade. I did not yet run the file through a css validator, but I do not expect it to fail, either.

My question is: does anyone see a problem with this approach? Is it posing a security risk? Is there a better way to do this?

Regards.

♦ Ninja ZX-10RR ♦:
You could also target it using the block id, but it works anyway.
There is no way to hack css, since it's just graphic stuff, you can't inject executable code in it.

Regards

ncoded:
Thanks, Ninja, I will then push this idea further to customize the look of my blocks.

♦ Ninja ZX-10RR ♦:
One of my old first topics in here might be useful :)
http://simpleportal.net/index.php?topic=13732

ncoded:
Yes, helpful especially with better understanding the portal and its "hidden" power. Though in this particular care I still prefer my way only because I fell more comfortable navigating between different blocks and custom stylings without having to change anything on the portal or smf files; I am completely segregated, which gives me peace of mind.

Navigation

[0] Message Index

Go to full version