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.
Why does a <label>tag</label> make my "tag" disappear?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Why does a <label>tag</label> make my "tag" disappear?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Why does a <label>tag</label> make my "tag" disappear?
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?
I have no "label display:none" type code, so what could do it?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Why does a <label>tag</label> make my "tag" disappear?
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?
Works for me too - so there must be something in my code that's killing it.
What could stop it working though?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Why does a <label>tag</label> make my "tag" disappear?
Ok I have found the issue, though not sure why this stopped it showing, but in another CSS I had this:
I've commented it out and it all still works, and the label displays.
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;
}Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.