[Help!] Make product page image full width

Hello community!?

I am currently building my product page, and I’m trying to make the main product image have no padding/ be full width on mobile.

Look at the images below for a visual presentation of what I’m looking to do. I’m using the Focal theme.

Is this possible to make the image break out of the container? Template code below

/*
 * MAIN LAYOUT
 */

@media screen and (max-width: 740px) {
  .product:not(.product--featured) {
    margin-top: var(--container-gutter);
    margin-bottom: 36px;
  }
}

@media screen and (min-width: 1000px) {
  .product {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .product:not(.product--featured) {
    margin-bottom: 80px;
  }

  .product__media {
    --product-media-width: calc(var(--grid-column-width) * 10 + var(--grid-gap) * 10);
    width: var(--product-media-width);
  }

  .product__info {
    --product-info-width: calc(var(--grid-column-width) * 9 + var(--grid-gap) * 8);
    width: var(--product-info-width);
    flex: none;
  }

  .product__info:only-child {
    margin-left: auto;
    margin-right: auto; /* Allows to center if this is the only child */
  }
}

@media screen and (min-width: 1200px) {
  .product {
    margin-left: calc(var(--grid-column-width) + var(--grid-gap));
    margin-right: calc(var(--grid-column-width) + var(--grid-gap));
  }

  .product__media {
    --product-media-width: calc(var(--grid-column-width) * 9 + var(--grid-gap) * 9);
  }

  .product__info {
    --product-info-width: calc(var(--grid-column-width) * 8 + var(--grid-gap) * 7);
  }
}

@media screen and (min-width: 1400px) {
  .product__media {
    --product-media-width: calc(var(--grid-column-width) * 10 + var(--grid-gap) * 10);
  }

  .product__info {
    --product-info-width: calc(var(--grid-column-width) * 7 + var(--grid-gap) * 6);
  }

  .product--thumbnails-bottom .product__media {
    --product-media-width: calc(var(--grid-column-width) * 9 + var(--grid-gap) * 8);
  }

  .product--thumbnails-bottom .product__info {
    --product-info-width: calc(var(--grid-column-width) * 8 + var(--grid-gap) * 7);
  }
}

/*
 * PRODUCT MEDIA PART
 */

.product__media {
  display: block;
}

.product__media-list-wrapper {
  position: relative;
  margin-left: auto;
  margin-right: auto;
}

.product__media-list,
.product__media-item {
  display: block;
  min-width: 100%;
  text-align: center;
}

.product__media-item {
  width: 100%;
}

.product__media-list:not(.flickity-enabled) .product__media-item:not(.is-selected),
.product__media .is-filtered {
  display: none;
}

.product__media-image-wrapper {
  overflow: hidden;
  background: rgb(var(--secondary-background)); /* Act as a placeholder until image is loaded */
  border-radius: var(--block-border-radius-reduced);
  z-index: 0; /* Creating new stacking context is needed on Safari to apply the border radius */
}

.product__media-nav {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}

.product__thumbnail-scroll-shadow {
  max-width: 100%;
}

.product__thumbnail-list {
  position: relative;
}

.product__thumbnail-list-inner {
  display: grid;
  grid-auto-flow: column;
  align-items: start;
}

.product__thumbnail-item {
  position: relative;
  display: inline-block;
  padding: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.product__thumbnail {
  position: relative;
  width: 76px;
  min-width: 76px;
  padding: 2px;
}

.product__thumbnail,
.product__thumbnail > img {
  border-radius: min(var(--block-border-radius), 4px);
}

.product__thumbnail .placeholder-background {
  display: block;
}

[dir="ltr"] .product__thumbnail::after {
  left: 0;
}

[dir="rtl"] .product__thumbnail::after {
  right: 0;
}

.product__thumbnail::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 0 0 2px rgb(var(--text-color));
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.product__thumbnail-item[aria-current] .product__thumbnail::after {
  opacity: 1;
  transform: scale(1);
}

[dir="ltr"] .product__thumbnail-badge {
  right: 4px;
}

[dir="rtl"] .product__thumbnail-badge {
  left: 4px;
}

.product__thumbnail-badge {
  position: absolute;
  top: 4px;
}

.product__view-in-space {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 8px;
}

[dir="ltr"] .product__view-in-space svg {
  margin-right: 14px;
}

[dir="rtl"] .product__view-in-space svg {
  margin-left: 14px;
}

.product__view-in-space[data-shopify-xr-hidden] {
  visibility: hidden;
}

[dir="ltr"] .product__zoom-button {
  right: 16px;
}

[dir="rtl"] .product__zoom-button {
  left: 16px;
}

.product__zoom-button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  bottom: 16px;
  border: 1px solid rgb(var(--border-color));
  border-radius: var(--button-border-radius);
  background: rgb(var(--root-background));
  color: rgb(var(--root-text-color));
  transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out, transform 0.25s ease-in-out, color 0.25s ease-in-out;
  z-index: 1;
}

.product__zoom-button[hidden] {
  opacity: 0;
  transform: scale(0.4);
  visibility: hidden;
}

@media screen and (max-width: 999px) {
  .product__media-list {
    margin-left: calc(-1 * var(--container-gutter));
    margin-right: calc(-1 * var(--container-gutter));
  }

  .product__media-item {
    padding-left: var(--container-gutter);
    padding-right: var(--container-gutter);
  }

  .product__media-nav .dots-nav {
    padding-left: 20px;
    padding-right: 20px;
  }

  .product__thumbnail-list {
    margin-left: calc(-1 * var(--container-gutter));
    margin-right: calc(-1 * var(--container-gutter));
  }

  .product__thumbnail-list-inner {
    padding-left: var(--container-gutter);
    padding-right: var(--container-gutter);
    width: max-content;
  }
}

@media screen and (min-width: 1000px) {
  .product__view-in-space {
    display: none; /* We do not show that button on desktop */
  }

  .product__media-nav {
    margin-top: 16px;
  }

  .product__thumbnail-scroll-shadow {
    --scroll-shadow-size: 65px;
    --scroll-shadow-right: linear-gradient(to left, rgb(var(--background)), rgba(var(--background), 0));
    --scroll-shadow-left: linear-gradient(to right, rgb(var(--background)), rgba(var(--background), 0));
    --scroll-shadow-bottom: linear-gradient(to top, rgb(var(--background)), rgba(var(--background), 0));
    --scroll-shadow-top: linear-gradient(to bottom, rgb(var(--background)), rgba(var(--background), 0));
  }

  .product__thumbnail-list {
    overflow: hidden;
  }

  .product__thumbnail-list-inner {
    grid-gap: 8px;
    gap: 8px;
  }

  .product__thumbnail {
    width: 64px;
    min-width: 64px;
  }

  /* Thumbnails left variation */
  .product--thumbnails-left .product__media {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
  }

  .product--thumbnails-left .product__media-nav {
    margin-top: 0;
    align-items: flex-start;
  }

  .product--thumbnails-left .product__media-list-wrapper {
    flex-grow: 1;
  }

  .product--thumbnails-left .product__media-prev-next {
    transform: rotate(90deg) scale(var(--scale-factor));
  }

  [dir="ltr"] .product--thumbnails-left .product__thumbnail-list {
    margin-right: 36px;
  }

  [dir="rtl"] .product--thumbnails-left .product__thumbnail-list {
    margin-left: 36px;
  }

  .product--thumbnails-left .product__thumbnail-list {
    max-height: calc((var(--product-media-width) - 136px) / var(--largest-image-aspect-ratio));
  }

  .product--thumbnails-left .product__thumbnail-list-inner {
    grid-auto-flow: row;
  }

  .product--thumbnails-left .product__thumbnail {
    width: 60px;
    min-width: 60px;
  }
}

@media screen and (min-width: 1400px) {
  [dir="ltr"] .product__media {
    padding-left: 36px;
  }
  [dir="rtl"] .product__media {
    padding-right: 36px;
  }
}

@media screen and (any-hover: hover) {
  .product__zoom-button:hover {
    color: rgba(var(--text-color), 0.7);
  }
}

/*
 * PRODUCT META
 */

.product-meta {
  display: block;
  margin: 24px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid rgb(var(--border-color));
}

.product-meta__price-list-container {
  display: flex;
  align-items: center;
  margin-top: -8px;
}

[dir="ltr"] .product-meta__label-list:not(:empty) {
  margin-left: 16px;
}

[dir="rtl"] .product-meta__label-list:not(:empty) {
  margin-right: 16px;
}

.product-meta__reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.product-meta__sku {
  position: relative;
  top: 1px;
  letter-spacing: 0.45px;
}

.product-meta__taxes-included {
  margin-top: 0;
}

.product-meta__aside {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}

.product-meta__share {
  display: flex;
  align-items: center;
}

[dir="ltr"] .product-meta__share-label {
  margin-right: 20px;
}

[dir="rtl"] .product-meta__share-label {
  margin-left: 20px;
}

.product-meta__share-button-list {
  display: inline-grid;
  grid-auto-flow: column;
  justify-content: flex-start;
  align-items: center;
  grid-gap: 18px;
  gap: 18px;
}

.product-meta__reviews-badge .rating__caption {
  position: relative;
}

.product-meta__reviews-badge .rating__caption::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: var(--transform-origin-end);
  transition: transform 0.3s;
}

@media screen and (min-width: 1000px) {
  .product-meta {
    margin-top: 0;
  }

  .product-meta__title {
    margin-bottom: 24px;
  }
}

@media screen and (any-hover: hover) {
  .product-meta__reviews-badge:hover .spr-badge-caption::after,
  .product-meta__reviews-badge:hover .rating__caption::after {
    transform: scaleX(1);
    transform-origin: var(--transform-origin-start);
  }
}

Have a great day! :folded_hands:

@Mathildew

Please share your store URL!

Thanks!

1 Like

This is the url :folded_hands: :folded_hands:
https://fitody.com/

1 Like

@Mathildew

Please add following css your assets/theme.css bottom of the file .

@media screen and (max-width: 999px){
.product__media-item {
    padding-left: 0px !important;
    padding-right: 0px !important;
}
}

Thanks!

1 Like

OMG Thank you!! I can’t believe it’s this easy!!

Is there a way to make the product description full width as well?

Thank you so much for your help!

@Mathildew

Please share product URL!

Thanks!

1 Like

https://fitody.com/

It’s the same URL :slightly_smiling_face: