If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Style input[type=text] for .cart_input only

Style input[type=text] for .cart_input only

Started by shop_suey on 24 Apr 2024, 5:52 AM · Views: 991

Results 1 to 5 of 5
24 Apr 2024, 5:52 AM
#1
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Post #1 by shop_suey

I want to style the mobile cartQuantity input fields.

I'm able to modify the values with the following entry.

input.cart_input_303[type=text]{}

How can I set a wildcard for the input[type=text] field for cartQuantity input fields only.

roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/

24 Apr 2024, 6:39 AM
#2
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Post #2 by shop_suey

I was late for edit.
The template is responsive_classic.

roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/

24 Apr 2024, 1:05 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #3 by lat9

Something like the following should work

input[class^="cart_input_"] {
    border: 3px solid purple;
}

for the shopping-cart page quantity inputs:

<input type="text" name="cart_quantity[]" value="1" size="4" class="cart_input_1:edff669e5da95c1d027b04d5412532fa" aria-label="Edit quantity in cart">

That CSS rule "says" to apply the styling to any inputs with a class= attribute whose value starts with** cart_input_**.

See this link for additional ways to identify a CSS selector: https://www.w3schools.com/cssref/css_selectors.php

24 Apr 2024, 1:54 PM
#4
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Post #4 by shop_suey

That looks very promising.
Thank you very much!
I will take care of it soon.

roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/

26 Apr 2024, 10:54 AM
#5
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Post #5 by shop_suey

It works like a charm and is very useful to style mobile cart for responsive_classic

roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/