Radio Buttons option each on a new line

  • Posts: 8
  • Thank you received: 0
13 years 1 month ago #42591

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

Last edit: 13 years 1 month ago by higgoboss. Reason: more info

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

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
13 years 1 month ago #42723

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 ?

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

  • Posts: 8
  • Thank you received: 0
13 years 1 month ago #42938

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..

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

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
13 years 1 month ago #43076

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.

  • Posts: 179
  • Thank you received: 17
12 years 11 months ago #49232

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 :)

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

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
12 years 11 months ago #49290
The following user(s) said Thank You: rikatos

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

  • Posts: 7
  • Thank you received: 0
12 years 11 months ago #49683

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.

Last edit: 12 years 11 months ago by 4drian.

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

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
12 years 11 months ago #49757

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

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

  • Posts: 7
  • Thank you received: 1
12 years 11 months ago #49778

What would these CSS changes look like for the fixed label width?

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

  • Posts: 7
  • Thank you received: 0
12 years 11 months ago #49801

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:

.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.

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
12 years 11 months ago #49840

Thanks for sharing the CSS you used.

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

Time to create page: 0.460 seconds
Powered by Kunena Forum