Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
Add custom class-name to media/image
jaguart #1
User title: jaguart
Member for 2 months · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: Add custom class-name to media/image
I want to be able to float my images - some left, and some right.

Of course, I can add in userstyle.css { float: right; } --or--{ float: left; } --but-- I can only have one of these apply at a time.

I want to do something like:

{{jamatic:graphite-design-01.jpg?480&class=fl-left|Basic design - Graphite / Grafana }}

and elsewhere on the page:

{{jamatic:graphite-design-02.jpg?480&class=fl-right|Capacity considerations - Graphite / Grafana }}

then I could mix and match to my hearts content. Is there a way to get the markup, esp. for images to include a custom class-name?

turnermm (Moderator) #2
Member since Oct 2009 · 4805 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
If all you want is to float left or right and add an image size,  you can do this with dokuwiki syntax

{{image?480|display name}}
{{  image?480|display name}} 
{{  image?480|display name  }}

This will give you the following classes: media, mediaright, mediacenter, which are defined in the CSS.

Or must you have you own class names names for left, right, and center?
Myron Turner
plugins, templates:
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-04-04, 12:22:08 (UTC +02:00)