This post is about a fairly
well-known skinning annoyance on DNN 4.x (apparently it has been
eliminated on DNN 5). There have been several posts about it and
several workarounds suggested, however none seem to work completely. I am starting this thread in case someone can share a reliable workaround without side effects.
Problem:
Regardless of the the Alignment setting of a module, if the admin
skin is loaded (e.g. when module showing an "edit" control") the module
always gets center alignment. This is because DNN inject the class
"DNNAligncenter" class to the container when Admin skin loaded. I have
found it very hard to override and retain functionality.
The frequently quoted solution is to override the DNNAligncenter class in the skin.css file, e.g.
.DNNAlignCenter{
text-align:left
}
or go to the main container that wraps around the site and specify left-align:
#mainConatiner td {text-align: left;}
... however these prevents you from setting centered alignment on any module when you do want centering.
Does anyone have a solution that overrides the centering when the admin skin is loaded, but does allow module alignment to be set to centered for selected modules (and that does not involve recompiling the DNN core)?
Here's my Gemini ticket about the issue:
DNNP-10566 |
|
|
Skinning |
Stop adding "DNNAligncenter" class when Admin skin loaded |