Page 1 of 1
Why does a <label>tag</label> make my "tag" disappear?
Posted: Wed May 06, 2015 7:08 am
by simonmlewis
I am using the <label> tag to make it easy for using to put a tick into a checkbox.
However, when I wrap the tag around the text, the text disappears.
Is there some common reason why this might happen?
I haven't got any "label" CSS going on.
Re: Why does a <label>tag</label> make my "tag" disappear?
Posted: Wed May 06, 2015 7:41 am
by Weirdan
Re: Why does a <label>tag</label> make my "tag" disappear?
Posted: Wed May 06, 2015 7:44 am
by simonmlewis
OH yes, I have another page where it DOES work. I don't know what could stop it working, is my question.
I have no "label display:none" type code, so what could do it?
Re: Why does a <label>tag</label> make my "tag" disappear?
Posted: Wed May 06, 2015 8:14 am
by simonmlewis
http://jsfiddle.net/simon_a6/nxbcax6t/1/
Works for me too - so there must be something in my code that's killing it.
What could stop it working though?
Re: Why does a <label>tag</label> make my "tag" disappear?
Posted: Wed May 06, 2015 8:34 am
by simonmlewis
Ok I have found the issue, though not sure why this stopped it showing, but in another CSS I had this:
Code: Select all
label:not(.arrows):not(.show-description-label) {
position: absolute;
left: 50%;
bottom: -45px;
z-index: 100;
width: 15px;
height: 15px;
background-color: rgba(200,200,200,1);
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
cursor: pointer;
-webkit-transition: background-color .2s;
-moz-transition: background-color .2s;
-o-transition: background-color .2s;
transition: background-color .2s;
}
I've commented it out and it all still works, and the label displays.