Stephanevg / PSHTML

Cross platform Powershell module to generate HTML markup language
https://pshtml.readthedocs.io/en/latest/
Other
165 stars 43 forks source link

Are HTML columns supported? #295

Closed JRSerjeant closed 2 years ago

JRSerjeant commented 3 years ago

Subject of the issue

Are HTML columns supported?

Steps to reproduce

div -Class "row" {
                div -Class "column" {"This is column 1"}
                div -Class "column" {"This is column 2"}
                }

Expected behaviour

The text would appear in two different columns

Actual behaviour

Test appears on top of each other.

Stephanevg commented 2 years ago

Hi @JRSerjeant,

In a nutshell, PSHTML outpus HTML, which is the same HTML5 you can find in any other web document. A column per see, as i understood it, is nothing else than a CSS property. CSS is support by PSHTML, so to answer you question, yes, column would be supported, but it seems like you are not using it correctly.

You will need to declare a CSS class, and assign that class to the the div (or any other element where you would like to have it applied to) via the -Class property.

An example is available on the mozilla website

For your case, you will can create a new folder called 'includes' in the same location where the script is located, add a new test.css file, and important your css file in the header section of your html document using the include function.

From that point, you should be able to use it as any other custom CSS property in your html document. I hope this helps :)

Cheers!