Hi -
I would like to style the Select boxes that OC uses in the Checkout (e.g., #payment-existing) process.
All I really want to do is re-color the Select Option bar and the radio button (which are both a lovely shade of blue that clashes with the rest of my site).
I am guessing that there must be a Javascript trick to make this happen. I have Googled, seen alot of discussion on the point, but no clear solutions. Has anyone been able to address this?
I am in OC 1.5.1.3.
Thanks.
I don't get what you are asking. Payment existing? Nonetheless, styling radio buttons/checkboxes is a bigger process than styling a select box. If you want to change the color of a select box just use CSS and place the style in the tpl like this:
Concerning checkboxes you are correct. It's best to use a mixture of javascript and CSS to really get a style that will look consistent in all browsers.
Code: Select all
<select name="country_id" style="background-color:#060; color:#300; font-family:Verdana, Geneva, sans-serif; font-size:18px;height:50px;">
I'll be more specific....
#payment-existing is a div in Step 2 of Checkout (where you select your billing address) which contains one of the Select boxes that I am referring to. There is a similar Select box in Step 3 of the Checkout.
These Select boxes (and radio buttons, etc.) in Step 2 and Step 3 of Checkout are driven by Javascript (jQuery?) that I am not familiar with.
I am interested in styling what appears in Step 2 and Step 3. Specifically, I am interested in styling the portions that appear in the blue background color -- from what I can tell, this is (a) the currently-selected option (i.e. address); and (b) the currently-selected radio button.
While you can style portions of the Select box using CSS, you cannot style the currently-selected option and radio button using CSS. For instance, the following CSS does nothing:
#payment-existing select option[selected="selected"] {background-color:green !important;}
#payment-existing select option[selected=selected] {background-color:green !important;}
Primary question: I am trying to determine if there if there is an approach through javascript perhaps to enable what I am looking for. If so, I would need the particular syntax.
Secondary questions: Do most/all OC sites simply leave the blue color in place? What are other programmers doing? Does OC have any plans to replace these selection boxes?
Thank you.
#payment-existing is a div in Step 2 of Checkout (where you select your billing address) which contains one of the Select boxes that I am referring to. There is a similar Select box in Step 3 of the Checkout.
These Select boxes (and radio buttons, etc.) in Step 2 and Step 3 of Checkout are driven by Javascript (jQuery?) that I am not familiar with.
I am interested in styling what appears in Step 2 and Step 3. Specifically, I am interested in styling the portions that appear in the blue background color -- from what I can tell, this is (a) the currently-selected option (i.e. address); and (b) the currently-selected radio button.
While you can style portions of the Select box using CSS, you cannot style the currently-selected option and radio button using CSS. For instance, the following CSS does nothing:
#payment-existing select option[selected="selected"] {background-color:green !important;}
#payment-existing select option[selected=selected] {background-color:green !important;}
Primary question: I am trying to determine if there if there is an approach through javascript perhaps to enable what I am looking for. If so, I would need the particular syntax.
Secondary questions: Do most/all OC sites simply leave the blue color in place? What are other programmers doing? Does OC have any plans to replace these selection boxes?
Thank you.
Who is online
Users browsing this forum: Baidu [Spider] and 293 guests