Skip to main content

Quantity Field Minimal width on mobile

More
4 years 11 months ago #336043 by szwart
-- url of the page with the problem -- : houtvanappel.nl/index.php/hikashop-categ...aarpot-vrachtwagen-a
-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.10.2
-- PHP version -- : 7.3.18
-- Browser(s) name and version -- : Chrome

Hi,

On mobile view my quantity field is to small.
how can i set a minimal width or a fixed with in the frontend css?
been searching long but cannot find the solution.

this occurs on the cart and product view.

Chart pc view


Chart mobile view


Product pc view


Product mobile view

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago - 4 years 11 months ago #336048 by Philip
Hello,

First of all, have a look on this tutorial to learn how to add custom css.

And second, your issue come from these css commands, have a look on my screenshot :


Now in order to answer your question, you can add this kind of commands :
Code:
// For ALL screen size .YOUR_REQUIRED_CONTEXT_HTML input[type="number"] { min-width: XXpx !important; } // For SMALL screen size (here: 600 px width) @media only screen and (max-width: 600px) { .YOUR_REQUIRED_CONTEXT_HTML input[type="number"] { min-width: YYpx !important; } }
OR
Code:
.YOUR_REQUIRED_CONTEXT_HTML input[type="number"] { padding: 2px 5px !important; }

The ".YOUR_REQUIRED_CONTEXT_HTML" is your context in order to apply your new command when required.

Note : the "!important" is to be sure to prioritize your custom commands over the unwanted command.
Hope this will help you to achieved your needs.

Regards
Last edit: 4 years 11 months ago by Philip.

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago #336060 by szwart
Hi Philip,

Thank you for your comment.
i tried following code, but unsuccesfull.

edited this in the frontend.css

// For SMALL screen size (here: 600 px width)
@media only screen and (max-width: 600px) {
.hikashop_product_quantity_field input[type="number"] {
min-width: 15px !important;
}

what am i doing wrong...

Please Log in or Create an account to join the conversation.

More
4 years 11 months ago #336061 by szwart
removed the padding out of the bootstrap.css that seems to solve the issue
The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.211 seconds
Powered by Kunena Forum