1

I have a list of checkboxes for timezones, something like this:

<input type="checkbox" class="TimeZoneCheckbox" value="-9.00" /><label class="TimeZoneLabel">US Alaska (GMT -9:00)</label>
<input type="checkbox" class="TimeZoneCheckbox" value="-8.00" /><label class="TimeZoneLabel">US Pacific Time (GMT -8:00)</label>
<input type="checkbox" class="TimeZoneCheckbox" value="-7.00" /><label class="TimeZoneLabel">US Mountain Time (GMT -7:00)</label>
<input type="checkbox" class="TimeZoneCheckbox" value="-6.00" /><label class="TimeZoneLabel">US Central Time, Mexico City (GMT -6:00)</label>
<input type="checkbox" class="TimeZoneCheckbox" value="-5.00" /><label class="TimeZoneLabel">US Eastern Time (GMT -5:00)</label>

I have the following CSS:

.TimeZoneCheckbox{clear:left;}
.TimeZoneLabel{float:right;}

I'm looking to avoid using <br /> tags and use CSS floats and clears. It should be working but it's not; what am I missing?

Thanks for your suggestions.

2 Answers 2

1

Or this...

.TimeZoneCheckbox{clear:left; float: left;}
.TimeZoneLabel{float:left;}

http://jsfiddle.net/vhPT4/

Sign up to request clarification or add additional context in comments.

Comments

0

try

.TimeZoneCheckbox{clear:left; float: left;}
.TimeZoneLabel{float:right;}

jsFiddle

3 Comments

I'm looking to get the checkbox labels aligned next to the checkboxes (I'll add a margin); for the moment, they're floating to the right.
Nevermind, I got it: .TimeZoneCheckbox{clear:left;float:left;} .TimeZoneLabel{float:left;}
@frenchie ya, float: left for both. clear for <input />.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.