Jump to content


Photo

giving a lable style based on "for"?


  • Please log in to reply
5 replies to this topic

#1 toolman

toolman

    Advanced Member

  • Members
  • PipPipPip
  • 156 posts

Posted 16 January 2013 - 07:05 AM

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

#2 Jessica

Jessica

    This is not my name.

  • Gurus
  • 8,982 posts
  • LocationDallas, TX
  • Age:26

Posted 16 January 2013 - 07:15 AM

No. You can style all labels or use classes or ids.
My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.

How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq

Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!

#3 Jessica

Jessica

    This is not my name.

  • Gurus
  • 8,982 posts
  • LocationDallas, TX
  • Age:26

Posted 16 January 2013 - 07:16 AM

Actually I take it back.
http://css-tricks.co...ibute-selectors
You may be able to. Try this.
My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.

How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq

Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!

#4 RussellReal

RussellReal

    Advanced Member

  • Members
  • PipPipPip
  • 1,774 posts
  • LocationTobyhanna, Pennsylvania

Posted 16 January 2013 - 05:41 PM

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

Edited by RussellReal, 16 January 2013 - 05:46 PM.

Like my help and want to hire me? Email me or add me to MSN at RussellonMSN@hotmail.com

#5 Philip

Philip

    Phailip

  • Staff Alumni
  • 4,746 posts

Posted 16 January 2013 - 07:59 PM

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 ;)

#6 RussellReal

RussellReal

    Advanced Member

  • Members
  • PipPipPip
  • 1,774 posts
  • LocationTobyhanna, Pennsylvania

Posted 16 January 2013 - 08:47 PM

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
Like my help and want to hire me? Email me or add me to MSN at RussellonMSN@hotmail.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com