Why custom radio does not uncheck after clicking another radio button? - html

I have two custom radio button , I have added a custom tick when clicked to be checked [tick], but when I clcik the second button the first radio button still checked .
here is jsfiddle: http://jsfiddle.net/03vwco7r/
here is html :
<p class="payment_module">
<input id="session1" name="radio-group" type="radio" />
<label for="session1">
<img src="https://picsum.photos/86/49/?random" alt="Zapłać przelewem" width="86" height="49">
Zapłać przelewem <span>(czas przetwarzania zamówienia będzie dłuższy)</span>
</label>
</p>
<p class="payment_module">
<input id="session1" name="radio-group" type="radio" />
<label for="session1">
<img src="{$image|escape:'htmlall':'UTF-8'}" alt="{l s='Pay with PayU' mod='payu'}" />
<a class="payu" href="{$actionUrl|escape:'htmlall':'UTF-8'}" title="{l s='Pay with PayU' mod='payu'}">
{l s='Pay with PayU' mod='payu'}
</a>
</label>
</p>
Here is css
input[type="radio"] {
display: none;
}
input[type="radio"] + label {
display: inline-block;
cursor: pointer;
}
input[type="radio"] + label:before {
content: "";
display: inline-block;
position: relative;
border: 1px solid #000;
border-radius:50px;
width: 60px;
height: 60px;
margin:0;
}
input[type="radio"]:checked + label:before {
content: "✔";
font-family: 'lucida grande';
font-size: 45px;
line-height: 60px;
text-align: center;
}
I want whena user click the second button the first button sholud be automatically unchecked,
What am I doing wrong in my code?

Because they have same "id" and "for" ,You should change "id" and "for" in second radio style:
<p class="payment_module">
<input id="session1" name="radio-group" type="radio" />
<label for="session1">
<img src="https://picsum.photos/86/49/?random" alt="Zapłać przelewem" width="86" height="49">
Zapłać przelewem <span>(czas przetwarzania zamówienia będzie dłuższy)</span>
</label>
</p>
<p class="payment_module">
<input id="session2" name="radio-group" type="radio" />
<label for="session2">
<img src="{$image|escape:'htmlall':'UTF-8'}" alt="{l s='Pay with PayU' mod='payu'}" />
<a class="payu" href="{$actionUrl|escape:'htmlall':'UTF-8'}" title="{l s='Pay with PayU' mod='payu'}">
{l s='Pay with PayU' mod='payu'}
</a>
</label>
</p>
session1 ===> session2

Related

Custom radio buttons to show/hide content

I am trying to build a interactive email content block that would show or hide content based on the selection. It worked before I tried to customize the label. It stopped working after I wrapped the input and label inside a div. I think it could be throwing my selectors off but I am not sure how remedy the problem.
.custom-radios input[type="radio"] + label span img {
opacity: 0;
transition: all 0.3s ease;
}
.custom-radios input[type="radio"]#red + label span {
background-color: red;
}
.custom-radios input[type="radio"]#blue + label span {
background-color: blue;
}
.custom-radios input[type="radio"]#green + label span {
background-color: green;
}
.custom-radios input[type="radio"]#orange + label span {
background-color: orange;
}
.custom-radios input[type="radio"]:checked + label span img {
opacity: 1;
}
#red{
display: none
}
#blue{
display: none
}
#green{
display: none
}
#orange{
display: none
}
input[type="red"]:checked ~ #red {
display: block
}
input[value="blue"]:checked ~ #blue {
display: block;
}
input[value="green"]:checked ~ #green {
display: block;
}
input[value="orange"]:checked ~ #orange {
display: block;
}
<div class="custom-radios">
<div>
<input type="radio" id="red" name="color" value="red">
<label for="red">
<span>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/242518/check-icn.svg" alt="Checked Icon" />
</span>
</label>
</div>
<div>
<input type="radio" id="blue" name="color" value="blue">
<label for="blue">
<span>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/242518/check-icn.svg" alt="Checked Icon" />
</span>
</label>
</div>
<div>
<input type="radio" id="green" name="color" value="green">
<label for="green">
<span>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/242518/check-icn.svg" alt="Checked Icon" />
</span>
</label>
</div>
<div>
<input type="radio" id="orange" name="color" value="orange">
<label for="orange">
<span>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/242518/check-icn.svg" alt="Checked Icon" />
</span>
</label>
</div>
<div class="spacer" style="line-height:26px;height:26px;mso-line-height-rule:exactly;"> </div>
<p style="margin:0;" id="red">
<img src="https://via.placeholder.com/580x200/FF0000/FFFFFF" width="580" alt="" style="width:100%;height:auto;max-width:580px;" />
</p>
<p style="margin:0;" id="blue">
<img src="https://via.placeholder.com/580x200/0000FF/FFFFFF" width="580" alt="" style="width:100%;height:auto;max-width:580px;" />
</p>
<p style="margin:0;" id="green">
<img src="https://via.placeholder.com/580x200/00FF00/FFFFFF" width="580" alt="" style="width:100%;height:auto;max-width:580px;" />
</p>
<p style="margin:0;" id="orange">
<img src="https://via.placeholder.com/580x200/FFA500/FFFFFF" width="580" alt="" style="width:100%;height:auto;max-width:580px;" />
</p>
<div class="spacer" style="line-height:26px;height:26px;mso-line-height-rule:exactly;"> </div>
</div>
I think selectors may be a weak point for you, again, I encourage you to check the CSS Selectors Reference from w3school.
Anyways, I made a simplified version, as similar as I could to you current structure, so you can see it working.
.hidden_input {
display: none;
}
#red_input+label>span {
background-color: red;
}
#blue_input+label>span {
background-color: blue;
}
label>span>img {
opacity: 0;
transition: all 0.3s ease;
}
.hidden_input:checked+label>span>img {
opacity: 1;
}
#red_content,
#blue_content {
display: none;
}
#red_input:checked~#red_content,
#blue_input:checked~#blue_content {
display: block;
}
<div class="custom-radios">
<input type="radio" id="red_input" class="hidden_input" name="color" value="red">
<label for="red_input">
<span>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/242518/check-icn.svg"/>
</span>
</label>
<input type="radio" id="blue_input" class="hidden_input" name="color" value="blue">
<label for="blue_input">
<span>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/242518/check-icn.svg"/>
</span>
</label>
<div class="spacer" style="line-height:26px;height:26px;mso-line-height-rule:exactly;"> </div>
<p style="margin:0;" id="red_content">
<img src="https://via.placeholder.com/580x200/FF0000/FFFFFF" width="580" style="width:100%;height:auto;max-width:580px;" />
</p>
<p style="margin:0;" id="blue_content">
<img src="https://via.placeholder.com/580x200/0000FF/FFFFFF" width="580" style="width:100%;height:auto;max-width:580px;" />
</p>
</div>
You can also play and place elements wherever you want in your HTML code, and then set their position with grid (it's just another option).

Multiple HTML/CSS only sliders on one page not changing independently

I am writing a blog post for a friend of mine, on the ghost platform. This blog post is going to be a very long post about multiple different objects, each requiring their own image slider. I'd like to re-use the same CSS for all 20 or so sliders on the page, only changing the html.
I followed a slider tutorial online, that created a html/css only slider, as Ghost doesnt support scripting in their individual blog posts.
Unfortunately, when i click on one thumbnail, the image in all the other sliders disapears, and is only shown in that particular slider, making scrolling down the page a very boring experience.
Anyone able to spot the error? Here is an excerpt using only two sliders. take a look at the result further down:
<style>
* {margin: 0; padding: 0;}
body {background: #ccc;}
.slider{
width: 640px;
position: relative;
padding-top: 320px;
margin: 100px auto;
box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.75);
}
.slider>img{
position: absolute;
left: 0; top: 0;
transition: all 0.2s;
}
.slider input[name='slide_switch'] {
display: none;
}
.slider label {
margin: 18px 0 0 18px;
border: 3px solid #999;
float: left;
cursor: pointer;
transition: all 0.5s;
opacity: 0.6;
}
.slider label img{
display: block;
}
.slider input[name='slide_switch']:checked+label {
border-color: #666;
opacity: 1;
}
.slider input[name='slide_switch'] ~ img {
opacity: 0;
transform: scale(1.1);
}
.slider input[name='slide_switch']:checked+label+img {
opacity: 1;
transform: scale(1);
}
</style>
**The xx: **
Insert image
About
Gallery of the xx
<div class="slider">
<input type="radio" name="slide_switch" id="id1"/>
<label for="id1">
<img src="http://thecodeplayer.com/uploads/media/3yiC6Yq.jpg" width="100"/>
</label>
<img src="http://thecodeplayer.com/uploads/media/3yiC6Yq.jpg"/>
<input type="radio" name="slide_switch" id="id2"/>
<label for="id2">
<img src="http://thecodeplayer.com/uploads/media/40Ly3VB.jpg" width="100"/>
</label>
<img src="http://thecodeplayer.com/uploads/media/40Ly3VB.jpg"/>
<input type="radio" name="slide_switch" id="id3"/>
<label for="id3">
<img src="http://thecodeplayer.com/uploads/media/00kih8g.jpg" width="100"/>
</label>
<img src="http://thecodeplayer.com/uploads/media/00kih8g.jpg"/>
<input type="radio" name="slide_switch" id="id4"/>
<label for="id4">
<img src="http://thecodeplayer.com/uploads/media/2rT2vdx.jpg" width="100"/>
</label>
<img src="http://thecodeplayer.com/uploads/media/2rT2vdx.jpg"/>
<input type="radio" name="slide_switch" id="id5"/>
<label for="id5">
<img src="http://thecodeplayer.com/uploads/media/8k3N3EL.jpg" width="100"/>
</label>
<img src="http://thecodeplayer.com/uploads/media/8k3N3EL.jpg"/>
</div>
**The yy**
Insert image
About
Gallery of the yy
<div class="slider">
<input type="radio" name="slide_switch" id="id6"/>
<label for="id6">
<img src="http://thecodeplayer.com/uploads/media/3yiC6Yq.jpg" width="100"/>
</label>
<img src="http://thecodeplayer.com/uploads/media/3yiC6Yq.jpg"/>
<input type="radio" name="slide_switch" id="id7"/>
<label for="id7">
<img src="http://thecodeplayer.com/uploads/media/40Ly3VB.jpg" width="100"/>
</label>
<img src="http://thecodeplayer.com/uploads/media/40Ly3VB.jpg"/>
<input type="radio" name="slide_switch" id="id8"/>
<label for="id8">
<img src="http://thecodeplayer.com/uploads/media/00kih8g.jpg" width="100"/>
</label>
<img src="http://thecodeplayer.com/uploads/media/00kih8g.jpg"/>
<input type="radio" name="slide_switch" id="id9"/>
<label for="id9">
<img src="http://thecodeplayer.com/uploads/media/2rT2vdx.jpg" width="100"/>
</label>
<img src="http://thecodeplayer.com/uploads/media/2rT2vdx.jpg"/>
<input type="radio" name="slide_switch" id="id10"/>
<label for="id10">
<img src="http://thecodeplayer.com/uploads/media/8k3N3EL.jpg" width="100"/>
</label>
<img src="http://thecodeplayer.com/uploads/media/8k3N3EL.jpg"/>
</div>
All of your radio buttons have the same name, so they're all considered a part of the same group. Only one radio button can be active in any one group. Each group should have a different name so they are grouped separately. Doing so will affect your current CSS but changing your attribute selector from name= to name^= or name*= will allow you to give each radio button set a different name. In the example below, we appended _1 to the second set.
* {
margin: 0;
padding: 0;
}
body {
background: #ccc;
}
.slider {
width: 640px;
position: relative;
padding-top: 320px;
margin: 100px auto;
box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.75);
}
.slider>img {
position: absolute;
left: 0;
top: 0;
transition: all 0.2s;
}
.slider input[name^='slide_switch'] {
display: none;
}
.slider label {
margin: 18px 0 0 18px;
border: 3px solid #999;
float: left;
cursor: pointer;
transition: all 0.5s;
opacity: 0.6;
}
.slider label img {
display: block;
}
.slider input[name^='slide_switch']:checked+label {
border-color: #666;
opacity: 1;
}
.slider input[name^='slide_switch']~img {
opacity: 0;
transform: scale(1.1);
}
.slider input[name^='slide_switch']:checked+label+img {
opacity: 1;
transform: scale(1);
}
<div class="slider">
<input type="radio" name="slide_switch_1" id="id1" checked>
<label for="id1">
<img src="http://thecodeplayer.com/uploads/media/3yiC6Yq.jpg" width="100">
</label>
<img src="http://thecodeplayer.com/uploads/media/3yiC6Yq.jpg">
<input type="radio" name="slide_switch_1" id="id2">
<label for="id2">
<img src="http://thecodeplayer.com/uploads/media/40Ly3VB.jpg" width="100">
</label>
<img src="http://thecodeplayer.com/uploads/media/40Ly3VB.jpg">
<input type="radio" name="slide_switch_1" id="id3">
<label for="id3">
<img src="http://thecodeplayer.com/uploads/media/00kih8g.jpg" width="100">
</label>
<img src="http://thecodeplayer.com/uploads/media/00kih8g.jpg">
<input type="radio" name="slide_switch_1" id="id4">
<label for="id4">
<img src="http://thecodeplayer.com/uploads/media/2rT2vdx.jpg" width="100">
</label>
<img src="http://thecodeplayer.com/uploads/media/2rT2vdx.jpg">
<input type="radio" name="slide_switch_1" id="id5">
<label for="id5">
<img src="http://thecodeplayer.com/uploads/media/8k3N3EL.jpg" width="100">
</label>
<img src="http://thecodeplayer.com/uploads/media/8k3N3EL.jpg">
</div>
<div class="slider">
<input type="radio" name="slide_switch" id="id6" checked>
<label for="id6">
<img src="http://thecodeplayer.com/uploads/media/3yiC6Yq.jpg" width="100">
</label>
<img src="http://thecodeplayer.com/uploads/media/3yiC6Yq.jpg">
<input type="radio" name="slide_switch" id="id7">
<label for="id7">
<img src="http://thecodeplayer.com/uploads/media/40Ly3VB.jpg" width="100">
</label>
<img src="http://thecodeplayer.com/uploads/media/40Ly3VB.jpg">
<input type="radio" name="slide_switch" id="id8">
<label for="id8">
<img src="http://thecodeplayer.com/uploads/media/00kih8g.jpg" width="100">
</label>
<img src="http://thecodeplayer.com/uploads/media/00kih8g.jpg">
<input type="radio" name="slide_switch" id="id9">
<label for="id9">
<img src="http://thecodeplayer.com/uploads/media/2rT2vdx.jpg" width="100">
</label>
<img src="http://thecodeplayer.com/uploads/media/2rT2vdx.jpg">
<input type="radio" name="slide_switch" id="id10">
<label for="id10">
<img src="http://thecodeplayer.com/uploads/media/8k3N3EL.jpg" width="100">
</label>
<img src="http://thecodeplayer.com/uploads/media/8k3N3EL.jpg">
</div>

center form on the page

I am trying to get my form to center on desktop. It's currently to the left side.
I tried doing display: block and margin-left: auto and margin-right: auto and it is still being fussy.
The picture below shows the issue and I'll add a snippet and a fiddle to help. Thanks in advance.
Jsfiddle: https://jsfiddle.net/r87h2L6n/
/*********FORMS CSS*************/
form {
display: block;
margin-left: auto;
margin-right: auto;
}
form.contact label {
display: block;
}
span {
display: block;
border: none;
color: white;
}
.clearfix:after {
content: " ";
display: block;
clear: both;
}
fieldset {
width: 45%;
float: left;
border: none;
}
input.checks {
width: auto;
}
.left {
width: 45%;
float: left;
}
.right {
width: 45%;
float: right;
}
input {
border: none;
border-bottom: 2px solid #959595;
width: 300px;
margin: 3px;
color: #6C6A6A;
padding-top: 10px;
padding-bottom: 10px;
}
.bottom {
border: none;
margin: 3px;
color: #6C6A6A;
padding-top: 10px;
padding-bottom: 10px;
width: 300px;
}
.fa {
margin-right: 10px;
}
legend {
color: white;
}
.button {
display: inline-block;
padding: 15px 25px;
font-size: 14px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: #595959;
border: none;
border-radius: 15px;
box-shadow: 0 9px #999;
width: 150px;
}
.button:hover {
background-color: #670809
}
.button:active {
background-color: #670809;
box-shadow: 0 5px #666;
transform: translateY(4px);
}
<section class="clearfix" id="fourthpara">
<div class="imgbox5">
<img id="pic5" class="adjustable float move" src="http://weknowyourdreams.com/images/kitten/kitten-08.jpg" alt="example web page">
</div>
<h2>Student Review 3</h2>
<p class="side">
“This class is up to date on the latest techniques, the instructor is willing to go the extra mile, and the class is well structured” -Papa Smurf
</p>
</section>
</div>
</section>
<div class="center clearfix">
<h1 id="fourth">Contact</h1>
<form action="FormToEmail.php" method="POST" enctype="multipart/form-data" autocomplete="on" class="contact clearfix ">
<section class="clearfix">
<fieldset>
<legend>
<i class="fa fa-user" aria-hidden="true"></i>Personal Information
<hr class="style2">
</legend>
<label><span></span>
<input name="first_name" type="text" value="" placeholder="First Name" required/>
</label>
<label><span>
</span>
<input name="last_name" type="text" value="" placeholder="Last Name" required/>
</label>
<label><span> </span>
<input name="date_of_birth" type="date" value="" placeholder="Date of Birth" required/>
</label>
<label><span>
</span>
<input type="number" name="quantity" min="1" max="6" placeholder="number of years until next degree">
</label>
<label><span></span>
<input name="level_of_education" type="hidden" value="" placeholder="level of education" required/>
</label>
<select class="bottom" name="education_level">
<option value="High School">High School</option>
<option value="Undergraduate">Undergradute</option>
<option value="Graduate">Graduate</option>
</select>
</fieldset>
<fieldset>
<legend><i class="fa fa-envelope-o" aria-hidden="true"></i>
Contact Information
<hr class="style2">
</legend>
<label><span>
</span>
<input class="ghost-input" name="email" value="" type="email" placeholder="youremail#email.com" autocomplete="off" />
</label>
<label><span></span>
<input name="phonenumber" value="" type="tel" placeholder="763-858-9564" />
</label>
<label><span></span>
<input name="website" value="" type="url" placeholder="https://yourwebsite.com" />
</label>
</fieldset>
</section>
<section class="clearfix column">
<fieldset>
<legend><i class="fa fa-laptop" aria-hidden="true"></i>
What are your Interests
<hr class="style2">
</legend>
<section class="clearfix column left">
<label class="bottom span"><span><input name="webdesign" value="web_design" type="checkbox" class="checks"/>Web Design</span>
</label>
<label class="bottom"><span><input name="webdevelopment" value="web_development" type="checkbox" class="checks" />Web Development</span>
</label>
<label class="bottom"><span><input name="computerscience" value="computer_science" type="checkbox"class="checks" />Computer Science</span>
</label>
</section>
<section class="clearfix column left">
<label class="bottom"><span><input name="graphicdesign" value="graphic_design" type="checkbox" class="checks"/>Graphic Design</span>
</label>
<label class="bottom"><span><input name="userexperience" value="user_experience" type="checkbox" class="checks" />User Experience</span>
</label>
<label class="bottom"><span><input class="checks" name="appdevelopment" value="app_development" type="checkbox" />App Development</span>
</label>
</section>
</fieldset>
<fieldset>
<legend><i class="fa fa-volume-control-phone" aria-hidden="true">
</i>
Follow Up
<hr class="style2 toosmall">
</legend>
<section class="clearfix column left">
<legend class="smaller">You can contact me by:</legend>
<br>
<div class="squish">
<label class="bottom"><span><input class="checks" name="contact_me" type="radio" value="phone" checked/>Contact me by phone</span>
</label>
<label class="bottom"><span><input class="checks" name="contact_me" type="radio" value="email" checked/>Contact me by email</span>
</label>
<label class="bottom"><span><input class="checks" name="contact_me" type="radio" value="text"/>Contact me by text</span>
</label>
<br>
</div>
</section>
<section class="clearfix column left">
<legend class="smaller">I'm interested in:</legend>
<br>
<label class="bottom"><span><input class="checks" name="interest" type="radio" value="text"/>Undergraduate</span>
</label>
<label class="bottom"><span><input class="checks" name="interest" type="radio" value="text"/>Graduate</span>
</label>
<label class="bottom"><span><input class="checks" name="interest" type="radio" value="text"/>Online</span>
</label>
</section>
</fieldset>
</section>
<input class="button" name="submit_to_programmer" type="submit" value="Submit" />
<input type="hidden" value="Message from Car Website" name="subject">
<input name="redirect" type="hidden" value="thanks.html">
</form>
To add to Michael_B`s answer your form is set to take up the full width of the page as its a block element by default and you have set it as well. Margin auto only works for elements that are block or inline-block elements and they width of either must be set to a specified value for it to work.
To address your problem now, looking at your source code, you can get the result you expect by removing the float set on your fieldset element in your CSS and setting Margin to auto in that element. I am not sure what the purpose of the float in that CSS rule but you cannot center something that you have set to float. Hope this helps
The reason it's not centering is that your form element is a block level container and, therefore, it's occupying 100% width of the page. As a result, there no space left for centering.
As you wrote:
I tried doing display: block and margin-left: auto and margin-right: auto and it is still being fussy.
Well, if you give an element display: block it consumes all available horizontal space. Hence, margin-left: auto and margin-right: auto have no effect.
Try defining a width for the form (e.g. width: 30em), removing float rules and/or giving the form text-align: center, which centers the child elements.
It's not your form that is the issue here, it is your fieldset...again. Give this a whirl.
fieldset {
width: 45%;
margin: 0 auto;
/* float: left; -- DELETE float: left if you want this centered */
border: none;
}
UPDATE:
If you also want that submit button to be centered, here is the css for that.
.button {
margin: 0 auto; /* ADDED THIS */
display: block; /* Took inline-block out, just use block */
padding: 15px 25px;
font-size: 14px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: #595959;
border: none;
border-radius: 15px;
box-shadow: 0 9px #999;
width: 150px;
}
LIVE DEMO

How to align radio button horizontally

I have radio button input with label, however I cannot align them horizontally, it just appeared one by one vertically, how can I make it align one by one horizontally.
<div class="cc-selector-2" align="right">
{{range $index,$url := .Avatars}}
<label for="pic1">
<input type="radio" name="avatar" id={{$url}} value={{$url}} />
<img src={{$url}} alt="" height="40" width="40"/>
</label>
{{end}}
</div>
<style>
.cc-selector-2 input{
position:absolute;
z-index:999;
}
label {
display: block;
text-align: center;
margin-bottom:0px;
font-size: .85em;
background-color:buttonface;
}
</style>
Just play with display: inline-block ;)
cc-selector-2{
text-align: center;
}
label {
display: inline-block;
margin:auto;
font-size: .85em;
background-color:buttonface;
}
input {
margin: 0;
}
<div class="cc-selector-2" align="right">
<label for="pic1">
<input type="radio" name="avatar" id={{$url}} value={{$url}} />
<img src={{$url}} alt="" height="40" width="40"/>
</label>
<label for="pic1">
<input type="radio" name="avatar" id={{$url}} value={{$url}} />
<img src={{$url}} alt="" height="40" width="40"/>
</label>
</div>

Checkbox not aligning despite CSS code applied

I am trying to get my checkboxes and labels aligned (into two a column), but it isn't working. Any idea what I can do to get it fixed?
Jsfiddle here: http://jsfiddle.net/wfju61oq/1/
.option label {
display: block;
padding-left: 15px;
text-indent: -15px;
}
.option input {
width: 13px;
height: 13px;
padding: 0;
margin:0;
vertical-align: bottom;
position: relative;
top: -1px;
*overflow: hidden;
}
Try this:
.option label {
display: block;
width: 220px;
}
.option input {
float:right;
}
Working fiddle here.
label {
display: block;
width: 300px;
text-align: right;
margin-right: 10px;
}
Here is a working JSFiddle:
http://jsfiddle.net/wfju61oq/8/
Warning: you have a &character in one of your id: this is incorrect.
demo - http://jsfiddle.net/victor_007/wfju61oq/10/
remove margin:0 for label and position:relative; top:-1px;
added border for better view of vertical alignment
.option label {
display: block;
padding-left: 15px;
text-indent: -15px;
width: 150px;
border: 1px solid red;
}
.option input {
width: 13px;
height: 13px;
vertical-align: bottom;
*overflow: hidden;
float: right;
}
<div class="option">
<fieldset>
<legend>Which Service Do You Require?</legend>
<label for="Hostess">Hostess
<input type="checkbox" id="Hostess" value="Hostess" />
</label>
<label for="usher">Usher
<input type="checkbox" id="usher" value="usher" />
</label>
<label for="welcomeguests">Welcome Guests
<input type="checkbox" id="welcomeguests" value="welcomeguests" />
</label>
<label for="guestlists">Guest Lists
<input type="checkbox" id="guestlists" value="guestlists" />
</label>
<label for="seatguests">Seat Guests
<input type="checkbox" id="seatguests" value="seatguests" />
</label>
<label for="servebuffmeal">Serve Buffet Meal
<input type="checkbox" id="servebuffmeal" value="servebuffmeal" />
</label>
<label for="servesitmeal">Serve Sit-Down Meal
<input type="checkbox" id="servesitmeal" value="servesitmeal" />
</label>
<label for="clearplates">Clear Plates
<input type="checkbox" id="clearplates" value="clearplates" />
</label>
<label for="cleartables">Clear Tables
<input type="checkbox" id="cleartables" value="cleartables" />
</label>
<label for="returnhplates">Return Hired Plates
<input type="checkbox" id="returnhplates" value="returnhplates" />
</label>
<label for="refilljuggs">Refill Jugs
<input type="checkbox" id="refilljugs" value="refilljuggs" />
</label>
<label for="">Serve V.I.P Guests
<input type="checkbox" id="servevipguests" value="servevipguests" />
</label>
<label for="">Cross-Check Invite List
<input type="checkbox" id="crosscheckivlist" value="crosscheckivlist" />
</label>
<label for="">Meet & Greet Guests
<input type="checkbox" id="Meet&GreetGuests" value="Meet&GreetGuests" />
</label>
<div style="clear: both"></div>
<label>Other
<input id="other" name="other" type="text" placeholder="Other" />
</label>
</fieldset>
</div>