/    Sign up×
Community /Pin to ProfileBookmark

Radio button label color change

How do I change the color of a radio button’s label. I have the following clode like this

<input value=”Single” name=”field_name_1″ id=”field_name_1″ type=”radio”>Single

I want to make the word Single in green color.So please guide me

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 28.2010 — [CODE]<input value="Single" name="field_name_1" id="field_name_1" type="radio"><label for="field_name_1" style="color:green;">Single</label>
[/CODE]
Copy linkTweet thisAlerts:
@cbVisionSep 28.2010 — Fang,

Your posts are always brilliant; I know you've solved a few of my problems! Isn't declaring the color bad practice now a days though? I thought it was always preferred to use rgb or hex?

color:green;[/QUOTE]

Vs.

[CODE]color: #0f0;[/CODE]

Nothing personal; just want your thought on it!
Copy linkTweet thisAlerts:
@FangSep 29.2010 — In posts here I tend to use color names as it's clearly understandable. In sites I do use hex.
Copy linkTweet thisAlerts:
@ManasipradeepauthorSep 29.2010 — Hi Fang,

Why is it a bad practice to use the color:green instead of hex.. I sometimes used to use it.
Copy linkTweet thisAlerts:
@KorSep 29.2010 — Hi Fang,

Why is it a bad practice to use the color:green instead of hex.. I sometimes used to use it.[/QUOTE]


For several reasons:

- literal colors are "rude". Designers hardly use the rude colors, for instance #ff0000 which is the equivalent of "red"

- there is no assurance that literal values are interpreted the same in all the browsers

- graphic design is dependent by tools like Photoshop, Illustrator, CorelDraw... You will never find literal values for colors there, will you? :rolleyes: So how can you assort a hexa or a rgb value with a literal one? After all there are tens of nuances of, let's say, green, so that a simple "green" value is not descriptive at all.
×

Success!

Help @Manasipradeep spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...