How does one use position selects to float an element in Craft CMS template? Say I want to allow an author to center or float a quote block to the right or left using a position select. How would I do this in the template?


You would typically just pop out a CSS class based on their selection.


<blockquote class="align--{{ block.myAlignment }}"></blockquote>

Just pop the value out into your markup, and then write the CSS to produce whatever effect you need

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.