I'm in the process of setting up a voting poll on a website.
The poll needs to be presented as a radio button followed by a <div>
that contains all relevant poll details. In this <div>
, I want the option text to appear on the left and the percentage on the right. Below is a simple visual representation of how I want the layout to look:
/---------------------------------------------------\
|/-------\/----------------------------------------\|
|| ||/------------------------\/------------\||
|| Radio ||| Option text || Percentage |||
|| ||\------------------------/\------------/||
|\-------/\----------------------------------------/|
\---------------------------------------------------/
I've almost achieved this (I believe!), but the widths are off, with the radio button taking up too much space. Ideally, they should only take up necessary width, while the <div>
housing additional data occupies the remaining space to the right.
Does anyone have any suggestions on how I can adjust my CSS/HTML code to achieve the desired layout?
You can access the code here - http://jsfiddle.net/D4cqL/