Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Css classes possible?

Started by Muut Archive 11 years ago · 5 replies · 314 views
11 years ago

hi there,

as a beginner i have one question in my mind: how is it possible to add classes inside the user/pages?
with md-syntax there is no possibility to add classes to tags.

thanks in advance for answering.

11 years ago

With markdown - no it's not possible BUT
If you have

YAML
markdown_extra: true

enabled in your system.yaml, you can use something like that

HTML
<div class="example" markdown="1"> 
Wow, still i can use markdown inside that div
</div>

And this will work :)

Simply, you can use html inside your user pages :) !

11 years ago

Actually I'm wrong :) In grav if you have markdown_extra enabled, you can do something like that:

TXT
![Sample Image](sample-image.jpg?resize=100,100) {.pull-left}

Above example will add class "pull-left" to image. I tested it also with other elements and it also works, so you're good to go :)

11 years ago

ok. yeah finally i found adding classes in the documentation and it works perfect.

GRAV IS AWESOME!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1326 9 years ago
Archive · by Muut Archive, 9 years ago
2 921 9 years ago
Archive · by Muut Archive, 9 years ago
2 4050 9 years ago
Archive · by Muut Archive, 9 years ago
1 2928 9 years ago
Archive · by Muut Archive, 9 years ago
3 1107 9 years ago