- Posts: 8
- Thank you received: 0
Radio Buttons option each on a new line
14 years 6 months ago - 14 years 6 months ago #42591
by higgoboss
Radio Buttons option each on a new line was created by higgoboss
Hi there
Loving the software - finally done with Virtuemart
I have set up some radio buttons with different options that the customer can click on
However they are all on one line - how do I change it so there that each radio button appears on a new line?
If I have not articulated this well enough I can send a picture - do I need to edit a css or is it simpler than that?
Higgo
Loving the software - finally done with Virtuemart
I have set up some radio buttons with different options that the customer can click on
However they are all on one line - how do I change it so there that each radio button appears on a new line?
If I have not articulated this well enough I can send a picture - do I need to edit a css or is it simpler than that?
Higgo
Last edit: 14 years 6 months ago by higgoboss. Reason: more info
Please Log in or Create an account to join the conversation.
14 years 6 months ago #42723
by nicolas
Replied by nicolas on topic Re: Radio Buttons option each on a new line
Hi,
You can do it by adding some CSS yes.
Could you give a link to the page where you have them so that we can give you the CSS you should use ?
You can do it by adding some CSS yes.
Could you give a link to the page where you have them so that we can give you the CSS you should use ?
Please Log in or Create an account to join the conversation.
14 years 6 months ago #42938
by higgoboss
Replied by higgoboss on topic Re: Radio Buttons option each on a new line
Hi there - thanks for the reponse
I managed to get the radio options on different lines by adding this bit of code
.hikashop_product_characteristics_table td input {
float: left;
vertical-align: middle;
margin-left: 5px;
margin-top: -3px;
margin-right: 10px;
}
However as a very amateur coder I am stuck again
How do I increase the line spacing between the options? I have managed to do this but only for the radio buttons and not the labels at the same time..
I managed to get the radio options on different lines by adding this bit of code
.hikashop_product_characteristics_table td input {
float: left;
vertical-align: middle;
margin-left: 5px;
margin-top: -3px;
margin-right: 10px;
}
However as a very amateur coder I am stuck again
How do I increase the line spacing between the options? I have managed to do this but only for the radio buttons and not the labels at the same time..
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43076
by nicolas
Replied by nicolas on topic Re: Radio Buttons option each on a new line
Could you give a link to the page where you have them so that we can give you the CSS you should use ?
Please Log in or Create an account to join the conversation.
14 years 5 months ago #49232
by rikatos
Replied by rikatos on topic Re: Radio Buttons option each on a new line
Hi there nicolas, I would like to know the answer to the rdio buttons on a seperate line each above. My test site is at
redcell.co.uk/voxel/shop/product/1-kru-sport-pro-iso
that is the page that has the radio buttons on
that is the page that has the radio buttons on
Please Log in or Create an account to join the conversation.
14 years 5 months ago #49290
by nicolas
Replied by nicolas on topic Re: Radio Buttons option each on a new line
It's in the documentation:
www.hikashop.com/en/support/documentatio...racteristic_vertical
www.hikashop.com/en/support/documentatio...racteristic_vertical
The following user(s) said Thank You: rikatos
Please Log in or Create an account to join the conversation.
14 years 4 months ago - 14 years 4 months ago #49683
by 4drian
Replied by 4drian on topic Re: Radio Buttons option each on a new line
Is it also possible to have the Caption above the Radio buttons and the options in total beside each other?
Like this:
Option 1 | Option 2 | Option 3
O Radio 1-1 | O Radio 2-1 | O Radio 3-1
O Radio 1-2 | O Radio 2-2 | O Radio 3-2
O Radio 1-3 | | O Radio 3-3
| | O Radio 3-4
or Horizontal but at least vertically aligned radio buttons:
Option 1 | O Radio 1-1 | O Radio 2-1 | O Radio 3-1
Option 2 | O Radio 1-2 | O Radio 2-2 | O Radio 3-2
Option 3 | O Radio 1-3 | xxxxxxxxxxxxx | O Radio 3-3
This would require that each radio button in generated into its own TD cell but I dont know where to find the code, that generates these. Under views there is show_block_charateristic but its code isn't quite helpful. I would actually appreciate the horizontal variant with fixed min-width for each radio option.
Kind regards,
Adrian.
Like this:
Option 1 | Option 2 | Option 3
O Radio 1-1 | O Radio 2-1 | O Radio 3-1
O Radio 1-2 | O Radio 2-2 | O Radio 3-2
O Radio 1-3 | | O Radio 3-3
| | O Radio 3-4
or Horizontal but at least vertically aligned radio buttons:
Option 1 | O Radio 1-1 | O Radio 2-1 | O Radio 3-1
Option 2 | O Radio 1-2 | O Radio 2-2 | O Radio 3-2
Option 3 | O Radio 1-3 | xxxxxxxxxxxxx | O Radio 3-3
This would require that each radio button in generated into its own TD cell but I dont know where to find the code, that generates these. Under views there is show_block_charateristic but its code isn't quite helpful. I would actually appreciate the horizontal variant with fixed min-width for each radio option.
Kind regards,
Adrian.
Last edit: 14 years 4 months ago by 4drian.
Please Log in or Create an account to join the conversation.
14 years 4 months ago #49757
by nicolas
Replied by nicolas on topic Re: Radio Buttons option each on a new line
I suppose that you should fix the width of each radio label to be constant (so option number 2) with just CSS without changing any code in HikaShop.
If you could give a link to a page with that display, I could look at giving you the exact CSS to use.
Otherwise, the code displaying the characteristics is in the file administrator/components/com_hikashop/types/characteristic.php
That's explained in the characteristics display override section of the developer's documentation:
www.hikashop.com/en/support/documentatio...tation.html#override
If you could give a link to a page with that display, I could look at giving you the exact CSS to use.
Otherwise, the code displaying the characteristics is in the file administrator/components/com_hikashop/types/characteristic.php
That's explained in the characteristics display override section of the developer's documentation:
www.hikashop.com/en/support/documentatio...tation.html#override
Please Log in or Create an account to join the conversation.
14 years 4 months ago #49778
by R_Fey
Replied by R_Fey on topic Re: Radio Buttons option each on a new line
What would these CSS changes look like for the fixed label width?
Please Log in or Create an account to join the conversation.
14 years 4 months ago #49801
by 4drian
Replied by 4drian on topic Re: Radio Buttons option each on a new line
Thank you for the tip. I was trying that before but forgot the display and float attribute. that way it ignored my label width for some reason. got it working now with the following css modifications:
Kind regards,
Adrian.
Code:
.hikashop_product_characteristic_chooser{
text-align: left;
}
.hikashop_product_characteristics_table{
width: 100%;
display: block;
vertical-align: middle;
line-height: 25px;
}
.hikashop_product_characteristics_table input{
float:left;
height: 18px;
}
.hikashop_product_characteristics_table label{
width: 93px;
white-space:nowrap;
padding-left: 2px;
float:left;
}
Kind regards,
Adrian.
Please Log in or Create an account to join the conversation.
14 years 4 months ago #49840
by nicolas
Replied by nicolas on topic Re: Radio Buttons option each on a new line
Thanks for sharing the CSS you used.
Please Log in or Create an account to join the conversation.
Time to create page: 0.216 seconds