mgason — 2012-08-22T10:33:52-04:00 — #1
I have some code which is not created by me. It comes from a credit card service. The text input fileds for cc number, expiry date month/Year and CCV all have the same class. They do have different names.
I need to change the width of the month / year fileds so that the fit next to each other. A little more CSS may be needed too. The problem is they all have the same class so I can't use that to affect only 2. Can I use the name?
<input class="intra-field-label" type="text" name="expiry[month]" maxlength="2" value="" size="2">
<input class="intra-field-label" type="text" name="expiry[year]" value="" maxlength="2" size="2">
Also even if I do change the size of all of them they change back when they ge focus. What causes that and how do I fix it?
If you want to see it in action go here (no I did not design it!) http://www.smyrnaheroesgala.com/products-page-2/contribute-money/contribute-100/
Add it to the cart, proceed to checkout and look at the bottom of the checkout page.
Please click remove for the product when you leave
philiptoop — 2012-08-22T11:31:39-04:00 — #2
The class attribute can have multiple class names within the quotes just separate them by a space. For example
dresden_phoenix — 2012-08-22T15:12:54-04:00 — #3
this looks like a job for the attribute selector (If you dont need to support IE6) !