Align price next to product tile

Topic summary

Goal: On mobile only, show the product price next to the product title on the product page (Shopify).

Progress:

  • Store URL shared (trevillo.com). Multiple suggestions provided with screenshots illustrating results.
  • Solution 1: Add custom code in theme.liquid (details not shown in thread) to achieve side‑by‑side layout on mobile.
  • Solution 2 (more explicit): Add CSS in base.css within a mobile media query (max-width: 749px). Key rules: make .product__info-container relative; position .price__container .price-item absolute at the right; adjust .product__tax and collapse the default price block height. This aligned the price next to the title.

Refinement:

  • To align title and price on the same height, the top offset was adjusted (from 15px to 13px). The requester confirmed this worked.

New issue:

  • The CSS change caused prices to appear over product images on collection/home pages—an unintended effect, shown via screenshots.

Status:

  • Original alignment on the product page (mobile) works after CSS adjustment.
  • Open item: Scope the CSS so it applies only on product pages to avoid affecting collection/home pages. No final fix posted yet.
Summarized with AI on December 23. AI used: gpt-5.

Hello! The link is trevillo.com. There is no password on it. Just 1 product where I want the price next to the title on the product page.

1 Like