I would like to make my product description wider.
This is what I currently have:
I would like the product description to start at about 50% of the screen width - not exactly 50% of the screen width because I need the spacing to be neat and consistent throughout. The product description and image must be evenly distributed across the screen.
If you can supply the code, I can manipulate the values to get it to where I need it.
Can anyone help?
It would be much appreciated.
Here is my store link: https://8ae3b9-27.myshopify.com/products/grange-contisuit-classic-2-piece
Thanks in advance.
Hi @ProconMarketing
Hope you are doing well you can achieve this by adding this CSS code into your theme editor >> base.css
.product.grid {
grid-template-columns: repeat(2, 1fr);
display: grid;
}
.product.grid .grid__item {
width: 100%;
max-width: 100%;
}
Thanks, but now it looks like this:
I would like the text to stretch across the rest of the screen.
Here is an example:
Replace this CSS
.product.grid .grid__item {
width: 100%;
max-width: 100%;
}
With this CSS in base.css
#MainContent .product.grid .grid__item {
width: 100%;
max-width: 100%;
}
Mention not just mark this as a solution and like the comment
Hi @Mehran_Ali
This code is making the mobile appear like this now:
I’d like it to look like it did before with the image at the top and the description underneath:
I tried the code like this to make it for desktop only, but it does not help.
Please help.
Hi @ProconMarketing
So Sorry about this kindly try this this will make it work only on a desktop
@media screen and (min-width: 990px) {
.product.grid {
grid-template-columns: repeat(2, 1fr);
display: grid;
}
#MainContent .product.grid .grid__item {
width: 100%;
max-width: 100%;
}
}
Thanks so much - worked perfectly! Really appreciate the help!
HI @Mehran_Ali , is it possible that this code is preventing my related items from showing up under my products?
My related items are not displaying.
Hi @ProconMarketing
The related product is not showing this issue is not related to the above code it something else I think you don’t have any related product in that product collection or you can go and check the editor if that doesn’t work you need to look into liquid code for that may be you need liquid expert
But the related product not showing issue has nothing to do with the CSS code for that I have to debug that
Thanks for the help and insight. I appreciate it!