Page 1 of 1

Checkout_payment.php > change the label class

Posted: Mon Jan 17, 2022 1:35 pm
by loop
Hi all
I need that the Label makes 100% of the width so i can format in the Label the information i need

Code: Select all

 <tr class="table-selection">
              <td><label for="p_<?= $choice['id'] ?>"><?= $choice['module'] ?></label></td>
              <td class="text-right">
i found out, thatt the if i add the class "d-block" to the label '<label class="d-block" <?= $choice['id'] ?>">' i have 100% width and i can format as i need
but i don't know how to do it (without overwriting the checkout_payment.php) can somebody helps me with a other idea, how to implement a hoock to do that? thanks in advance!

Re: Checkout_payment.php > change the label class

Posted: Mon Jan 17, 2022 2:16 pm
by loop
i have found 1 solution, but don't know if it's the nicest. I added this in the custom css:

Code: Select all

form[name="checkout_payment"] > div > div > div > table > tbody > tr > td > label {
  display:block !important;
}
it works, but maybe there is a better way?

Re: Checkout_payment.php > change the label class

Posted: Mon Jan 17, 2022 6:58 pm
by ecartz
If you know the choice ID and it is always the same, you could just do

Code: Select all

LABEL[for="p_1"]
Replace the 1 as appropriate.

If not, I suspect that

Code: Select all

FORM[name="checkout_payment"] LABEL {
would be sufficient.