css: make checked checkbox label bold

In many case, we want to highlight the checked checkbox label, so user know it’s checked without mistake. If you know CSS syntax, it becomes very easy:

In below case, we just want a certain check box (service, and network type checkbox)label changes:

.service-checkbox:checked + .checkbox-text,
.network-type-checkbox:checked + .checkbox-text {
   font-weight: bold;
}
Advertisements

About qianggan

Sr. Software Engineer
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s