How can I write a CSS code to align an image to the right?

Topic summary

Main issue: Align a Shopify section image fully to the right edge (flush with the page border).

Early steps: The OP sought a CSS snippet. Initial generic tips (e.g., img { float: right; } or display: -webkit-box; margin-left: auto;) didn’t work, likely due to theme layout constraints. The OP shared relevant HTML markup and later a preview link but could not grant collaborator access.

Clarification: After a check, the image was on the right but not flush. The OP wanted it touching the right border.

Solution provided: A targeted CSS fix for desktop (media query min-width: 1050px) was shared, applied to the specific Shopify section ID. Key changes:

  • Set the section’s page-width to max-width: 100% and remove padding/margins.
  • Adjust feature-row margin to reduce side spacing.
    The code was to be added at the bottom of assets/theme.css.

Outcome: The OP confirmed the CSS achieved the desired alignment. The discussion is resolved.

Notes: Screenshots were central to clarifying the desired alignment. Terms: “media query” (CSS rules for specific viewport sizes) and Shopify “section ID” (unique selector for targeting a specific section).

Summarized with AI on January 25. AI used: gpt-5.

@IhorBulhakov

Please share your store URL!

Thanks!