toolman Posted January 16, 2013 Share Posted January 16, 2013 Hi, Is it possible to style a lable based on "for" For example, can I give this label a class of "initial" using the for="initial" attribute? <label for="initial">Initial *</label> Thanks Link to comment https://forums.phpfreaks.com/topic/273234-giving-a-lable-style-based-on-for/ Share on other sites More sharing options...
Jessica Posted January 16, 2013 Share Posted January 16, 2013 No. You can style all labels or use classes or ids. Link to comment https://forums.phpfreaks.com/topic/273234-giving-a-lable-style-based-on-for/#findComment-1406089 Share on other sites More sharing options...
Jessica Posted January 16, 2013 Share Posted January 16, 2013 Actually I take it back. http://css-tricks.com/attribute-selectors You may be able to. Try this. Link to comment https://forums.phpfreaks.com/topic/273234-giving-a-lable-style-based-on-for/#findComment-1406090 Share on other sites More sharing options...
RussellReal Posted January 16, 2013 Share Posted January 16, 2013 Jessica, that is not necessarily a cross-browser solution at the moment. (IE6 Is almost out the door completely, however, a large population around the world still uses IE6 -- Don't believe me, check out the IE6 map created by microsoft themselves.) It would be best to give the "for" attribute value to a class like Jessica originally suggested, for best results across all browsers. - Russell Link to comment https://forums.phpfreaks.com/topic/273234-giving-a-lable-style-based-on-for/#findComment-1406241 Share on other sites More sharing options...
Philip Posted January 17, 2013 Share Posted January 17, 2013 On 1/16/2013 at 10:41 PM, RussellReal said: however, a large population around the world still uses IE6 Do note that every website will be different and their analytics should be checked to see if it needs to be supported still. Anything under 5% can generally be forgotten about. That said, IE6 is also 12 years old now... IMO it's time to move on and use newer CSS tricks Link to comment https://forums.phpfreaks.com/topic/273234-giving-a-lable-style-based-on-for/#findComment-1406263 Share on other sites More sharing options...
RussellReal Posted January 17, 2013 Share Posted January 17, 2013 On 1/17/2013 at 12:59 AM, Philip said: Do note that every website will be different and their analytics should be checked to see if it needs to be supported still. Anything under 5% can generally be forgotten about. That said, IE6 is also 12 years old now... IMO it's time to move on and use newer CSS tricks Duly noted, however, I feel that certain things like this don't affect your site in the slightest, and should be cross-browser compatible. If it takes you an extra 3 seconds to do this, and have a larger audience see it exactly the way it was intended to, I honestly see no harm in it. If it was a 4 hour fix for IE6, than yes, its most likely better to drop support for IE6. Unless ofcourse IE6 is a requirement, there are a lot of what-ifs out there. The bottom line here really is that as you're developing a website from the ground up, knowing what is or isn't fully supported is the key to NOT having to do as many fixes in the long-run, almost all of my work is IE6+ compatible, but I mark it as IE7+ compatible, because I look forward to the day that IE6 is not even remembered anymore, however, it is still there now, as much of a shame as that may be. - Russell Link to comment https://forums.phpfreaks.com/topic/273234-giving-a-lable-style-based-on-for/#findComment-1406268 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.