Characteristics Option Selected Label Colour

  • Posts: 966
  • Thank you received: 11
10 years 6 months ago #192569

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6

I'm really sorry to bother you but I have been spending hours trying to get this to work and have tried many variations but still stumped.

On an earlier version of HikaShop I was able to get the characteristics option label to have an active/selected colour using this:

#hikashop_product_characteristics_options input[type=radio]:checked + label {
	background-image: none; outline: 0; box-shadow: inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05); background-color:#6FA907; }

But no matter what I try now I just can't get it to work and was wondering if you can give me a hand. Here are some of the options that I tried:
#hikashop_product_characteristics div.controls input[type=radio]:checked + label, #hikashop_product_characteristics div.controls:checked + label,
#hikashop_product_characteristics div.controls label input[type=radio]:checked, #hikashop_product_characteristics inputbox:checked + .radio {
	background-image:none; outline:0; background-color:#6FA907;  }

Please see attached pic of what I am referring to. Thanks in advance!

Attachments:

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 6 months ago #192576

Hi,

could you provide a link to that page so that we could look at the CSS you already have on your website and analyze it ?

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

  • Posts: 966
  • Thank you received: 11
10 years 6 months ago #192790

Hi Nicolas,

I sent the links privately. Thanks!

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 6 months ago #192807

Hi,

I don't think that you can use input.checked + label as the input is inside the label and not next to it.
In that case, you need to use something like that: label > input:checked
If you want to style the text next to the radio, you should put HTML in the values of the characteristics like that:
<span>Medium</span>

And that way you could do: input.checked + span
in your CSS

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

  • Posts: 966
  • Thank you received: 11
10 years 6 months ago #193018

Sorry but sometimes it takes so long to find things... What view is the content that I need to edit in?

Been through a few files but no luck finding it so far :(

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

  • Posts: 13201
  • Thank you received: 2322
10 years 6 months ago #193065

Hi,

As Nicolas told you:

If you want to style the text next to the radio, you should put HTML in the values of the characteristics like that:
<span>Medium</span>


So you don't have to edit any views but just fill the values of the characteristics with HTML.
And then apply css properties as explained.

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

  • Posts: 966
  • Thank you received: 11
10 years 6 months ago #193206

Sorry I did not understand the instructions originally...

Thanks for the solution but this is causing more work - I assume there isn't an easier way? And, why did the set-up change in this version of Hikashop?

Now that I did what you suggested the background is not covering the entire button and I have tried several options :(

Attachments:

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 6 months ago #193213

Hi,

I don't recall that we removed any HTML regarding that.
If you had additional HTML, then all I can think of would be that you had edited the PHP code directly to add them (and thus that's normal that you lost the modification after the update).

It's normal that the background is not covering the entire button. You need to adapt the CSS creating the button so that it applies to the span, not the label in that case.

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

Time to create page: 0.065 seconds
Powered by Kunena Forum