Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 add to cart buttons not working
Previous Page
Author « Topic »
Page: of 2

charmarsh
Ecommerce Template Expert

USA
989 Posts

Posted - 09/20/2026 :  13:36:27  
thanks David,
I believe I made the changes and it is better, but still not 100%. Would you take another look please?

Thank you so much.

midvalleydrifter001
Ecommerce Template Expert

USA
987 Posts

Posted - 09/20/2026 :  16:09:50  
The problem is caused by each product box being set to 49% width while the Ecommerce Templates option fields retain wider sizing. The dropdown then overflows its product box.

Add this CSS immediately after the existing div.product rules:

/* Keep product options inside each product box */
div.product {
width: 49%;
min-width: 0;
box-sizing: border-box;
}

div.product .optioncontainer {
display: grid;
grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
align-items: center;
column-gap: 8px;
width: 100%;
box-sizing: border-box;
}

div.product .optiontext,
div.product .option {
width: auto;
min-width: 0;
box-sizing: border-box;
}

div.product select.prodoption,
div.product input[type="text"].prodoption {
display: block;
width: 100%;
max-width: 100%;
min-width: 0;
box-sizing: border-box;
}

@media screen and (max-width: 800px) {
div.product {
width: 99%;
}
}


Your complete existing inline section would become:

<style type="text/css">
div.category {
width: 49%;
}

div.product {
width: 49%;
min-width: 0;
box-sizing: border-box;
}

div.product .optioncontainer {
display: grid;
grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
align-items: center;
column-gap: 8px;
width: 100%;
box-sizing: border-box;
}

div.product .optiontext,
div.product .option {
width: auto;
min-width: 0;
box-sizing: border-box;
}

div.product select.prodoption,
div.product input[type="text"].prodoption {
display: block;
width: 100%;
max-width: 100%;
min-width: 0;
box-sizing: border-box;
}

@media screen and (max-width: 800px) {
div.category,
div.product {
width: 99%;
}
}
</style>


This keeps the labels on the left and makes every “Please Select…” dropdown shrink to the available space inside its product box. No changes to the generated product HTML are needed.

Patrick

charmarsh
Ecommerce Template Expert

USA
989 Posts

Posted - 09/21/2026 :  09:56:10  
Thank you Patrick,

I did add it to the test page and it solved beautifully! However seems like a lot of code for the page. Is there another way? Can I add it to one of the .css files?

Edited by - charmarsh on 09/21/2026 11:53:36

dbdave
ECT Moderator

USA
10772 Posts

Posted - 09/21/2026 :  12:02:58  
Hi, it will work just the same in the stylesheet, but since this os for the product page only, I would leave it there.
That is a very small amount of css and it will not slow your pages at all.
If you want to shorten it you can remove the spaces and each entry can be on it's own line
for example
div.product .optiontext, div.product .option {width: auto; min-width: 0; box-sizing: border-box; }

Thanks,
David

charmarsh
Ecommerce Template Expert

USA
989 Posts

Posted - 09/21/2026 :  12:08:30  
Thank you David, and Patrick!
Page: of 2 « Topic »  
Previous Page
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000