40fingers / StyleHelper-Sko

Manipulate DNNCMS HTML, JS and CSS in #dnncms
https://www.40fingers.net/Products/DNN-Stylehelper
7 stars 2 forks source link

Add css class to HTML and FORM tags #6

Closed puresystems closed 3 years ago

puresystems commented 4 years ago

Hi, is there a way to add a css class to the html and form tags as this would allow us to implement some bootstrap functionality. We can edit the default.aspx to do this but it's not the best way forward.

Thanks Dan

Timo-Breumelhof commented 4 years ago

I normally use AddBodyClass for that and add classes to the Bosy element. But I think you can also use AddHtmlAttribute to add a class to the HTML element.

<fortyfingers:STYLEHELPER ID="SH1" AddHtmlAttribute="class:myclass" 
runat="server" />

https://www.40fingers.net/Products/DNN-Stylehelper

puresystems commented 4 years ago

Thanks Timo, this worked for us. We used this format for adding a class to the HTML tag:

<fortyfingers:STYLEHELPER ID="SH2" AddHtmlAttribute="class,h-100" runat="server" />

Would there be anyway to update the module to allow us to add classes to the FORM tag? We trying out the sticky footer template in Bootstrap 4.5 and this seems to require some classes added to form in Dnn for it to work.

Timo-Breumelhof commented 4 years ago

To be honest I have never needed that in all these years. Are you sure it's really necessary? Do you mean this example? https://getbootstrap.com/docs/4.0/examples/sticky-footer/

TBH that's a bit legacy now. I would check out the more modern Flexbox based solutions like https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ Way more simple and scalable in my opinion..

puresystems commented 4 years ago

We were looking at this version: https://getbootstrap.com/docs/4.5/examples/sticky-footer/

This appears to use flexbox. We found we had to add BS classes to all the main container elements to get it to work.

But the example you gave looks simpler so we'll take a look at that as well!

Thanks.

Timo-Breumelhof commented 4 years ago

ok good if it does not work out let me know.