You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,27 @@ This will generate a class prefixed with ``align-``. The example above
97
97
would produce a ``class="align-top"``. Adding a ``class`` key to the image
98
98
attributes automatically merges the alignment with the attribute class.
99
99
100
+
As per the choice use multiple alignment style options with ``DJANGOCMS_PICTURE_ALIGN``, for example::
101
+
must have to align image with multiple styles such as left, right or center as well as float image and verticle align image.
102
+
103
+
DJANGOCMS_PICTURE_ALIGN = [
104
+
('left', _('Align left')),
105
+
('right', _('Align right')),
106
+
('center', _('Align center')),
107
+
#image-float align option
108
+
("start", _("Float left")),
109
+
("end", _("Float right")),
110
+
#verticle-align option
111
+
('top', _('Align top')),
112
+
('middle', _('Align middle')),
113
+
('bottom', _('Align Bottom')),
114
+
('baseline', _('Align baseline')),
115
+
]
116
+
117
+
This will generate a class prefixed with ``align-``. For left align option the above example would produce a ``class="align-left"``. Adding a ``class`` key to the image attributes automatically merges the alignment with the attribute class.
118
+
It works same for others align options.
119
+
For this refer https://getbootstrap.com/docs/5.2/content/images/#aligning-images for css styles.
120
+
100
121
You can enable responsive images technique by setting``DJANGOCMS_PICTURE_RESPONSIVE_IMAGES`` to ``True``.
101
122
In this case uploaded images will create thumbnails of different sizes according
102
123
to ``DJANGOCMS_PICTURE_RESPONSIVE_IMAGES_VIEWPORT_BREAKPOINTS`` (which defaults to ``[576, 768, 992]``) and browser
0 commit comments