You are not logged in.

Dear visitor, welcome to Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Monday, August 27th 2018, 6:20pm

Assign CSS IDs and Classes to arbitrary layers / plugins?

all divs in krpanos html output are styled inline without any use of IDs or classes.

layer / plugin names given in XML codes aren't available in the outputted code.

i didn't find a way to assign a class or ID to a layer element of my skin.
i need that to get access from outside of krpano for styling and/or injecting content changes with jquery.
any help available for this problem?

thanks thomas
thomas bredenfeld


Tuesday, August 28th 2018, 9:02am


the sprite property links to the the internal div element a layer element (or a hotspot element defined with renderer="css3d"):

Here an example to access it and set some custom CSS property:…76225#post76225

The same could do also done to set the CSS id:

Source code

<action name="set_css_id" type="Javascript"> = args[1];

<layer ...

or to add CSS classes by using className,

or do all that directly via JS from external by using the JS-APIs:

But when using custom CSS styles avoid changing the sizes in any way, that could break the layout - and note that some css properties will be set/used already by krpano itself.

Best regards,


Tuesday, August 28th 2018, 4:36pm

danke vielmals klaus,
ich denke, das wird mir erstmal helfen :-)
lg thomas
thomas bredenfeld