For caption formatting use the following parameters on the captionpix command
- captionalign – align the caption text either left, right or center
- captionclass – CSS class used to define the caption (all other params apart from captiontext are ignored)
- captionfontcolor – colour of the caption font
- captionfontsize – size in pixels of the caption font
- captionfontfamily – font family for caption text – either inherit or a font name
- captionfontstyle – font style for caption text – either normal or italic
- captionmargintop – space to leave at the top of the caption in pixels
- captionmarginbottom – space to leave at the bottom of the caption in pixels
For example
captionalign="left"
puts the caption on the left
captionalign="center"
puts the caption in the center
captionalign="right"
puts the caption on the right
captionalign="justify"
applies justification to the caption text
For valid alignment settings, see W3 schools CSS text-align.
Example Of A Photo With Caption Text Justified
Here is the code:
captionpix theme="elegant" imgsrc="https://diy.cdn746.com/captionpix/posts/support/pinksands-harbour-island.jpg" captiontext="This is a view from our garden room at Pink Sands hotel on Harbour Island in the Bahamas. The caption is long in order to make it wrap and make the text justification more obvious" captionalign="justify" captionpaddingleft="5" captionpaddingright="5" width="450"
Here is the result
Leave a Reply