Strange scrolling behavior in IE with checkboxes in a scrollable div - css

I have a "multiselect" control that looks like this (sorry for the long id names, they are kinda autogenerated because this whole thing is being generated by a custom tag):
<div class="default-skin-outer" id="myMapSelect_multiSelectOuterDiv">
<div class="default-control" id="myMapSelect_multiSelectControlDiv">
<span class="default-icon-check-text" id="myMapSelect_multiSelectControlCheckWrapperSpan">
<span class="default-icon default-icon-check" id="myMapSelect_multiSelectControlCheckIconSpan"></span><span class="default-icon default-icon-text" id="myMapSelect_multiSelectControlCheckTextSpan">Check All</span>
</span>
<span class="default-icon-uncheck-text" id="myMapSelect_multiSelectControlUncheckWrapperSpan">
<span class="default-icon default-icon-uncheck" id="myMapSelect_multiSelectControlUncheckIconSpan"></span><span class="default-icon default-icon-text" id="myMapSelect_multiSelectControlUncheckTextSpan">Uncheck All</span>
</span>
</div>
<div class="default-skin-inner" id="myMapSelect_multiSelectInnerDiv">
<ul class="default-multiselect">
<li class="default-multiselect">
<label class="default-label">
<input type="checkbox" value="0" class="default-checkbox" id="myMapSelect0" name="myMapSelect"> Zero
</label>
</li>
<li class="default-multiselect">
<label class="default-label">
<input type="checkbox" value="1" class="default-checkbox" id="myMapSelect1" name="myMapSelect"> One
</label>
</li>
<li class="default-multiselect">
<label class="default-label">
<input type="checkbox" value="2" class="default-checkbox" id="myMapSelect2" name="myMapSelect"> Two
</label>
</li>
<li class="default-multiselect">
<label class="default-label">
<input type="checkbox" value="3" class="default-checkbox" id="myMapSelect3" name="myMapSelect"> Three
</label>
</li>
<li class="default-multiselect">
<label class="default-label">
<input type="checkbox" value="4" class="default-checkbox" id="myMapSelect4" name="myMapSelect"> Four
</label>
</li>
<li class="default-multiselect">
<label class="default-label">
<input type="checkbox" value="5" class="default-checkbox" id="myMapSelect5" name="myMapSelect"> Five
</label>
</li>
<li class="default-multiselect">
<label class="default-label">
<input type="checkbox" value="6" class="default-checkbox" id="myMapSelect6" name="myMapSelect"> Six
</label>
</li>
<li class="default-multiselect">
<label class="default-label">
<input type="checkbox" value="7" class="default-checkbox" id="myMapSelect7" name="myMapSelect"> Seven
</label>
</li>
</ul>
</div>
</div>
The CSS for this whole thing is:
div.default-skin-outer {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
width: 300px;
height: auto;
padding: 2px;
background-color: #f0f0f0;
border: 1px solid #999999;
}
div.default-skin-inner {
overflow: auto;
width: 300px;
height: 100px;
}
div.default-control {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
width: auto;
border: 1px solid #555555;
background-color: #999999;
color: #f0f0f0;
vertical-align: middle;
padding: 2px;
margin-bottom: 2px;
font-weight: bold;
overflow: hidden;
}
ul.default-multiselect {
padding: 0px;
margin: 0px;
white-space: nowrap;
}
ul.default-with-padding {
padding: 0px;
padding-left: 20px;
margin: 0px;
white-space: nowrap;
}
li.default-multiselect {
list-style-type: none;
}
label.default-label {
display: block;
padding: 2px;
}
input.default-checkbox {
width: 13px;
height: 13px;
padding: 0;
margin: 0;
vertical-align: bottom;
position: relative;
top: -1px;
*overflow: hidden;
}
span.default-icon {
background-image: url("/resources/authoring/jqueryui/custom-theme/images/ui-icons_ffffff_256x240.png");
display: inline-block;
height: 16px;
width: 16px;
overflow: hidden;
}
span.default-icon-text {
width: auto;
background: none;
}
span.default-icon-text:hover {
text-decoration: underline;
cursor: pointer;
}
span.default-icon-check-text {
float: left;
}
span.default-icon-uncheck-text {
float: right;
}
span.default-icon-check {
background-position: -64px -144px;
}
span.default-icon-uncheck {
background-position: -96px -128px;
}
This works beautifully in Firefox. The checkboxes scroll without any problem in the scrollable div. But when I looked at this in IE8, it looks terrible.
Firstly, the extra checkboxes bleed outside the main div. Secondly (and this is the really strange thing) when I use the scroll bar, the text scrolls, but the checkboxes do not. They simply stay in place while the text scrolls. I tried googling for a solution but was unable to come up with anything.
Thanks!
UPDATE
So I found out that if I remove the funky part in the checkbox styling:
vertical-align:bottom;
position:relative;
top: -1px;
*overflow: hidden;
It works fine. But I put that in to make sure my labels and checkboxes are lined up properly.
Oh yes as far as the compatibility view is concerned, this is IE8 running under compatibility mode.
In response to the comments about inherited styles, here are styles that the checkbox inherits:
input {
border:1px solid #CFCFCF;
color:#000000;
font-family:Arial,Verdana,Sans-Serif;
font-size:12px;
padding-left:4px;
}
li.default-multiselect {
list-style-type:none;
}
ul.default-with-padding {
white-space:nowrap;
}
table {
empty-cells:show;
}
html, body {
line-height:16px;
}
I don't see anything that could potentially interfere...

There seems to be some strange interaction between inherited styles and the styles I have defined. That much is clear from Jacob's and Ray's comments since they were able to slap this code onto a page and have it render fine in IE without any issues.
I was able to make it behave properly by removing position:relative from the input.default-checkbox style.
I'm assuming that some sort of bizarre interaction is making the checkboxes think they are positioned statically or absolutely (or something) due to which they don't scroll. At least I think that's the reason; someone may be able to provide a better reason and shed light on this. At any rate, by removing the position:relative, I was able to make the strange scrolling-behavior stop. Thanks for helping me figure this out!

As #rossisdead suggested, adding position: relative to the scrolling element solves the problem. I also had to add position: relative to the parent of the scrolling element.

Make sure you don't have position: fixed set on your checkboxes in any other stylesheets.

Related

Accessible CSS-only tab view

I'm working on a site that needs to (a) work without JavaScript and (b) be keyboard-accessible.
I have used the label target trick to build a tab view (https://css-tricks.com/functional-css-tabs-revisited/), but I've noticed that it relies on the label being clicked. I can't figure out how to make it work with the keyboard. Is this possible?
.tabs {
background-color: #eee;
min-height: 400px;
}
.tabs__list {
border-bottom: 1px solid black;
display: flex;
flex-direction: row;
list-style: none;
margin: 0;
padding: 0;
position: relative;
}
.tabs__tab {
padding: 0.5rem;
}
.tabs__content {
display: none;
left: 0;
padding: 0.5rem;
position: absolute;
top: 100%;
}
.tabs__input {
display: none;
}
.tabs__input+label {
cursor: pointer;
}
.tabs__input:focus,
.tabs__input:hover {
color: red;
}
.tabs__input:checked+label {
color: red;
}
.tabs__input:checked~.tabs__content {
display: block;
}
<div class="tabs">
<ul class="tabs__list">
<li class="tabs__tab">
<input class="tabs__input" type="radio" id="tab-0" name="tab-group" checked>
<label for="tab-0" class="tabs__label" tabindex="0" role="button">Tab 0</label>
<div class="tabs__content">
Tab 0 content
</div>
</li>
<li class="tabs__tab">
<input class="tabs__input" type="radio" id="tab-1" name="tab-group">
<label for="tab-1" class="tabs__label" tabindex="0" role="button">Tab 1</label>
<div class="tabs__content">
Tab 1 content
</div>
</li>
</ul>
</div>
Accepted answer is not an accessible solution.
I have made some corrections and some observations here. Do not use the accepted answer in production if you stumble across this question in the future. It is an awful experience with a keyboard.
The answer below fixes some of the CSS issues to make it more accessible.
However I would recommend you reconsider the no JavaScript requirement.
I can understand having a good fall-back (which the example I give below with the fixes is) but there is no way you can make a fully accessible set of CSS only tabs.
Firstly you should use WAI-ARIA to complement your HTML to make things even more clear for screen readers. See the tabs examples on W3C to see what WAI-ARIA roles you should be using. This is NOT possible without JavaScript as states need to change (aria-hidden for example should change).
Secondly, you should be able to use certain shortcut keys. Press the home key for example in order to return to the first tab, something you can only do with a little JS help.
With that being said here are a few things I fixed with the accepted answer to at least give you a good starting point as your 'no JavaScript fallback'.
Problem 1 - tabindex on the label.
By adding this you are creating a focusable element that cannot be activated via keyboard (you cannot press space or Enter on the label to change selection, unless you use JavaScript).
In order to fix this I simply removed the tabindex from the labels.
Problem 2 - no focus indicators when navigating via keyboard.
In the example the tabs only work when you are focused on the radio buttons (which are hidden). However at this point there is no focus indicator as the styling is applying styling to the checkbox when it is focused and not to its label.
In order to fix this I adjusted the CSS with the following
/*make it so when the checkbox is focused we add a focus indicator to the label.*/
.tabs__input:focus + label {
outline: 2px solid #333;
}
Problem 3 - using the same state for :hover and :focus states.
This is another bad practice that needs to go away, always have a different way of showing hover and focus states. Some screen reader and screen magnifier users will use their mouse to check they have the correct item focused and orientate themselves on a page. Without a separate hover state it is difficult to check you are hovered over a focused item.
/*use a different colour background on hover, you should not use the same styling for hover and focus states*/
.tabs__label:hover{
background-color: #ccc;
}
Example
In the example I have added a hyperlink at the top so you can see where your focus indicator is when using a keyboard.
When your focus indicator is on one of the two tabs you can press the arrow keys to change tab (which is expected behaviour) and the focus indicator will adjust accordingly to make it clear which tab was selected.
.tabs {
background-color: #eee;
min-height: 400px;
}
.tabs__list {
border-bottom: 1px solid black;
display: flex;
flex-direction: row;
list-style: none;
margin: 0;
padding: 0;
position: relative;
}
.tabs__tab {
padding: 0.5rem;
}
.tabs__content {
display: none;
left: 0;
padding: 0.5rem;
position: absolute;
top: 100%;
}
.tabs__input {
position: fixed;
top:-100px;
}
.tabs__input+label {
cursor: pointer;
}
.tabs__label:hover{
background-color: #ccc;
}
.tabs__input:focus + label {
outline: 2px solid #333;
}
.tabs__input:checked+label {
color: red;
}
.tabs__input:checked~.tabs__content {
display: block;
}
A link so you can see where your focus indicator is
<div class="tabs">
<ul class="tabs__list">
<li class="tabs__tab">
<input class="tabs__input" type="radio" id="tab-0" name="tab-group" checked>
<label for="tab-0" class="tabs__label" role="button">Tab 0</label>
<div class="tabs__content">
Tab 0 content
</div>
</li>
<li class="tabs__tab">
<input class="tabs__input" type="radio" id="tab-1" name="tab-group">
<label for="tab-1" class="tabs__label" role="button">Tab 1</label>
<div class="tabs__content">
Tab 1 content
</div>
</li>
</ul>
</div>
It is just radio buttons... Keyboard can be used to navigate through them using tab and space bar to check them.
I'd use :focus to highlight the chosen tab and the tabindex property to make it work as I wanted.
Please provide more dept if you have problem with a SPECIFIC problem related to it, and provide a basic code example here, no linking.
Since hidden inputs cannot be selected through keyboard, make them visible...
.tabs {
background-color: #eee;
min-height: 400px;
}
.tabs__list {
border-bottom: 1px solid black;
display: flex;
flex-direction: row;
list-style: none;
margin: 0;
padding: 0;
position: relative;
}
.tabs__tab {
padding: 0.5rem;
}
.tabs__content {
display: none;
left: 0;
padding: 0.5rem;
position: absolute;
top: 100%;
}
.tabs__input {
position: fixed;
top:-100px;
}
.tabs__input+label {
cursor: pointer;
}
.tabs__input:focus
.tabs__input:hover {
color: red;
}
.tabs__input:checked+label {
color: red;
}
.tabs__input:checked~.tabs__content {
display: block;
}
<div class="tabs">
<ul class="tabs__list">
<li class="tabs__tab">
<input class="tabs__input" type="radio" id="tab-0" name="tab-group" checked>
<label for="tab-0" class="tabs__label" tabindex="0" role="button">Tab 0</label>
<div class="tabs__content">
Tab 0 content
</div>
</li>
<li class="tabs__tab">
<input class="tabs__input" type="radio" id="tab-1" name="tab-group">
<label for="tab-1" class="tabs__label" tabindex="0" role="button">Tab 1</label>
<div class="tabs__content">
Tab 1 content
</div>
</li>
</ul>
</div>

css selector for text inside a label and using a before and after

This my first question, so I hope that I ask it correctly.
Matthew Cain has created a great example of a fancy radio button using html and css which can be seen at https://www.templatemonster.com/blog/style-checkboxes-radio-buttons-css/. In it he uses this code:
body {
margin: 0;
padding: 0;
font-family: 'PT Sans', sans-serif;
font-size: 1.3em;
font-weight: bold;
color: #fff;
}
#first {
background-color: #4B4D65;
}
#second {
background-color: #FF8A66;
}
.section {
padding: 100px;
padding-left: 150px;
}
.section input[type="radio"],
.section input[type="checkbox"]{
display: none;
}
.container {
margin-bottom: 10px;
}
.container label {
position: relative;
}
/* Base styles for spans */
.container span::before,
.container span::after {
content: '';
position: absolute;
top: 0;
bottom: 0;
margin: auto;
}
/* Radio buttons */
.container span.radio:hover {
cursor: pointer;
}
.container span.radio::before {
left: -52px;
width: 45px;
height: 25px;
background-color: #A8AAC1;
border-radius: 50px;
}
.container span.radio::after {
left: -49px;
width: 17px;
height: 17px;
border-radius: 10px;
background-color: #6C788A;
transition: left .25s, background-color .25s;
}
input[type="radio"]:checked + label span.radio::after {
left: -27px;
background-color: #EBFF43;
}
<section id="first" class="section">
<div class="container">
<input type="radio" name="group1" id="radio-1">
<label for="radio-1"><span class="radio">Coffee</span></label>
</div>
<div class="container">
<input type="radio" name="group1" id="radio-2">
<label for="radio-2"><span class="radio">Tea</span></label>
</div>
<div class="container">
<input type="radio" name="group1" id="radio-3">
<label for="radio-3"><span class="radio">Cappuccino</span></label>
</div>
</section>
When I debug it in Chrome I see
<span class="radio"> == $0
::before
"Coffee"
::after
</span"
Here is my HTML:
<body class="my_PageBg" data-usepopupcontrols="no">
<div class="my_DesktopContainer my_temp_unselect" style="display: none;">
<div tabindex="1" class="container"
id="radio1" style="transform-origin: center 50%; left: 20px; top: 40px; width: 660px; height: 100px;
overflow: auto; position: absolute; z-index: 1; direction: ltr; transform: inherit; transform-style: preserve-3d;"
contenteditable="false">
<tbody>
<tr>
<td style="padding: 0px; white-space: nowrap;">
<label style="cursor: default;" onkeydown="onTreeLabelKeyDown(event)" for="radio10" name="radio1">
<input name="radio1" tabindex="1" id="radio10" onclick='OnResetDownChainControls("radio1",event)' type="radio" checked="" value="Value1"/>
Val1
</label>
</td>
</tr>
<tr>
<td style="padding: 0px; white-space: nowrap;">
<label style="cursor: default;" onkeydown="onTreeLabelKeyDown(event)" for="radio11" name="radio1">
<input name="radio1" tabindex="1" id="radio11" onclick='OnResetDownChainControls("radio1",event)' type="radio" value="Value2"/>
Val2
</label>
</td>
</tr>
<tr>
<td style="padding: 0px; white-space: nowrap;"><label style="cursor: default;" onkeydown="onTreeLabelKeyDown(event)" for="radio12" name="radio1">
<input name="radio1" tabindex="1" id="radio12" onclick='OnResetDownChainControls("radio1",event)' type="radio" value="Value3"/>
Val3
</label>
</td>
</tr>
</tbody>
I am trying to do the same to the Text "Val1", "Val2", "etc.
Please note that I can not change the html since it is coming from an external call.
What css selector can I use?
::after and ::before pseudo-elements do not apply to replaced-elements or void-elements.
But you can use a <span> to achieve the desired effect. Example:
.my-special-class:before {
content: '[before] ';
}
.my-special-class:after {
content: ' [after]';
}
.my-special-class:before,
.my-special-class:after {
color: red;
}
<span class="my-special-class">Val 1</span>
Obviously, you can name the class to whatever you want and change the selectors accordingly.
Note: if you want to use pseudo-elements as graphics (to give them size, position, background-image, border, background, etc – without actual content) you must still specify content: '' (empty string). Without setting content, the pseudo-element will not render, regardless of display, visibility or opacity.
Most CSS attributes that can be applied to a normal DOM element can be applied to pseudo-elements.
<label>s can have pseudo's, but that would mean the :before gets placed before the <input>, which is included in the <label>. If you want to place the :before after the <input> (which cannot have pseudo's), you have to wrap the text node in a <span>, as in the example.
Also note that, even though the spec defines pseudo elements officially with double colon notation (::pseudo-element), all browsers supporting double colon notation also support the legacy single colon notation, while a few legacy versions (IE pre v9, FF pre v1.5, Opera pre v7) only support the single colon notation. For this reason, most people use the single colon notation (which is, officially, wrong, but technically right, at least for now).

set text inside a check box

Hi is it possible to add text inside check box replacing the tick icon.
I am could not achieve it with this code could someone suggest me how to make a size selection box with a text inside it
<ion-col>
<p>Choose the size</p>
<ion-item>
<ion-checkbox >S</ion-checkbox>
</ion-item>
</ion-col>
Help me to bring out this type of UI
You can hide the input and use the label to select the checkbox. Then style your label like in the example below, using :not(:checked) and :checked selectors. Same logic can be applied to radio buttons.
ul {
padding: 0;
margin: 0;
clear: both;
}
li{
list-style-type: none;
list-style-position: outside;
padding: 10px;
float: left;
}
input[type="checkbox"]:not(:checked),
input[type="checkbox"]:checked {
position: absolute;
left: -9999%;
}
input[type="checkbox"] + label {
display: inline-block;
padding: 10px;
cursor: pointer;
border: 1px solid black;
color: black;
background-color: white;
margin-bottom: 10px;
}
input[type="checkbox"]:checked + label {
border: 1px solid white;
color: white;
background-color: black;
}
<ul>
<li>
<input type="checkbox" id="check_1" name="check_1" value="check_1">
<label for="check_1">S</label>
</li>
<li>
<input type="checkbox" id="check_2" name="check_2" value="check_2">
<label for="check_2">M</label>
</li>
<li>
<input type="checkbox" id="check_3" name="check_3" value="check_3">
<label for="check_3">L</label>
</li>
<li>
<input type="checkbox" id="check_4" name="check_4" value="check_4">
<label for="check_4">XL</label>
</li>
</ul>
Updated
check updated demo here
Add the following Js to get the relevant radio value
JS:
$("body").on("click", "label", function(e) {
var getValue = $(this).attr("for");
var goToParent = $(this).parents(".select-size");
var getInputRadio = goToParent.find("input[id = " + getValue + "]");
console.log(getInputRadio.attr("id"));
});
I assume that the user select only one size at a time. if user can select the multiple size modify the example with checkbox.
Try this
Check Demo here
HTML:
<div class="select-size">
<input type="radio" name="s-size" id="small" checked/>
<input type="radio" name="s-size" id="medium" />
<input type="radio" name="s-size" id="large" />
<input type="radio" name="s-size" id="x-large" />
<input type="radio" name="s-size" id="xx-large" />
<label for="small">S</label>
<label for="medium">M</label>
<label for="large">L</label>
<label for="x-large">XL</label>
<label for="xx-large">XXL</label>
</div>
CSS:
.select-size input{
display: none;
}
label {
display: inline-block;
width: 50px;
height: 50px;
text-align: center;
border: 1px solid #ddd;
line-height: 50px;
cursor: pointer
}
#small:checked ~ label[for="small"],
#medium:checked ~ label[for="medium"],
#large:checked ~ label[for="large"],
#x-large:checked ~ label[for="x-large"],
#xx-large:checked ~ label[for="xx-large"] {
background: #999;
color: #ffffff;
}

Positioning a menu list underneath a textbox with CSS

I'm struggling with CSS to get my search box and list to look like how I want it. I want the list to be attached to the bottom of the textbox and I have no idea how to do that. Here is a short of what I've got so far...
<style>
ul.drop{display:inline-block;}
ul.drop, ul.drop li { list-style: none; margin: 0; padding: 0; background: #ECF1F3; color: #28313F; }
ul.drop li.hover, ul.drop li:hover { position: relative; z-index: 599; background: #1e7c9a;}
</style>
</head>
<body>
<label for="someinput">Search Ingredients</label>
<input id="someinput">
<ul id="menu" class="drop" style="overflow:auto; max-height:200px;">
<li>ingredient1</li>
<li>ingredient2</li>
<li>ingredient3</li>
<li>ingredient4</li>
<li>ingredient5</li>
</ul>
<label for="qty"></label>
<input type="text" size="5" name="qty" id="qty" />
g
<button type="submit" name="add" id="add" value="Add">Add</button>
</body>
The list is currently showing to the right of the box, I would like it to be directly underneath the textbox. I was considering a container div for the list, but wasn't sure if that was necessary.
Thanks for your help.
You have two options here both would involve changing you html to the following:
<div class="inputHolder">
<label for="left someinput">Search Ingredients</label>
<input id="someinput" /><br />
<ul id="menu" class="drop" style="overflow:auto; max-height:200px;">
<li>ingredient1</li>
<li>ingredient2</li>
<li>ingredient3</li>
<li>ingredient4</li>
<li>ingredient5</li>
</ul>
</div>
<div class="inputHolder">
<label for="qty">g</label>
<input type="text" size="5" name="qty" id="qty" />
<button type="submit" name="add" id="add" value="Add">Add</button>
</div>
Then if you want to have your list appear above any further content (ie content will be pushed down), you need the following extra styles:
.inputHolder {float:left; margin-right:10px;}
#menu {margin-left:7.5em}
http://jsfiddle.net/FteVT/3/
If you want your list to appear on top of (overlapping) any further content, you can use these styles:
.inputHolder {float:left; margin-right:10px; position:relative;}
#menu {position:absolute; left:7.5em; top:1.5em;}
http://jsfiddle.net/FteVT/4/
sorry this is'nt really an answer but you might be interested in jquery chosen component, which does the job : jQuery Chosen
When I run your code in a fiddle, I get this: http://jsfiddle.net/Lera/VG642/
With this CSS
ul.drop{display:inline-block;}
ul.drop, ul.drop li { list-style: none; margin: 0; padding: 0; background: #ECF1F3; color: #28313F; }
ul.drop li.hover, ul.drop li:hover { position: relative; z-index: 599; background: #1e7c9a;}
The list is under the search box and its label, not to the right as you said. I don't think I'm clear where you want it from your question.
Did you want the list indented? Can you clarify a bit more?
To start you have a href before li that needs to be moved inside of the li, also remove display: block-inline and leave block only, then add #someinput { display: block}
<label for="someinput">Search Ingredients</label>
<input id="someinput">
<ul id="menu" class="drop" style="overflow:auto; max-height:200px;">
<li> ingredient1</li>
<li> ingredient2</li>
<li> ingredient3</li>
<li> ingredient4</li>
<li> ingredient5</li>
</ul>
<label for="qty"></label>
<input type="text" size="5" name="qty" id="qty" />
<button type="submit" name="add" id="add" value="Add">Add</button>
CSS Portion
ul.drop{display:block;}
ul.drop, ul.drop li { list-style: none; margin: 0; padding: 0; background: #ECF1F3; color: #28313F; }
ul.drop li.hover, ul.drop li:hover { display: block; position: relative; z-index: 599; background: #1e7c9a;}
#someinput {
display:block;
}
See my jsfiddle here http://jsfiddle.net/cornelas/P7z7d/embedded/result/

Radio button formatting in IE8 (not displaying correctly)

I'm having a problem with getting my radio buttons laid out (and checkboxes) correctly in IE8 .. Firefox, Chrome, Opera all working however ..
Here is a screenshot of the problem
The code is below:
.row input (line 471) {
float: left;
display: inline;
width: 16px;
height: 16px;
margin-top: 0pt;
margin-right: 5px;
margin-bottom: 0pt;
margin-left: 0pt;
}
.row label (line 479) {
float: none;
font-weight: normal;
font-size: 12px;
line-height: 16px;
}
div.panes label (line 70) {
font-size: 95%;
font-weight: bold;
color: #222222;
line-height: 150%;
padding-bottom: 3px;
display: block;
}
<label for="AdditionalResponses_0__Response" id="AdditionalResponses_0__Response_Label">Single answer</label>
<div class="row " id="AdditionalResponses_0__Response">
<input id="AdditionalResponses_0__Response_one" name="AdditionalResponses[0].Response" type="radio" value="one" />
<label for="AdditionalResponses_0__Response_one" id="AdditionalResponses_0__Response_one_Label">one</label>
<input id="AdditionalResponses_0__Response_two" name="AdditionalResponses[0].Response" type="radio" value="two" />
<label for="AdditionalResponses_0__Response_two" id="AdditionalResponses_0__Response_two_Label">two</label>
<input id="AdditionalResponses_0__Response_three" name="AdditionalResponses[0].Response" type="radio" value="three" />
<label for="AdditionalResponses_0__Response_three" id="AdditionalResponses_0__Response_three_Label">three</label>
<input id="AdditionalResponses_0__Response_four" name="AdditionalResponses[0].Response" type="radio" value="four" />
<label for="AdditionalResponses_0__Response_four" id="AdditionalResponses_0__Response_four_Label">four</label>
</div>
Sorry for the one long line, but that's how I got it through the source..
Try removing the height or float from .row input.
Avoid adjusting the line-height if you can, as well.
Looks like another case of IE Stepdown: Preventing Menu Stepdown
Are you trying to align them vertically or horizontally?
If vertically, add this to your css
.row label {
display: block;
}
and change your markup so that your inputs are wrapped by the labels. You wouldn't have to use the for="" attribute this way.
<label>
<input id="AdditionalResponses_0__Response_one" name="AdditionalResponses[0].Response" type="radio" value="one" />
one
</label>
If horizontally, add
.row input, .row label {
float: left;
display: block;
}
Im not sure but - did you try the clear property?
in your case the value would be left i think
w3 source

Resources