You are viewing limited content. For full access, please sign in.

Question

Question

CSS for field formatting

asked on December 15, 2016 Show version history

I am using a CSS class to help format a large set of fields. This is part of it:

.name1 label {width: 172px;}
.name1 .cf-field {width: 270px;}
.name1 .cf-small {width: 270px;}

The .cf-field and .cf-small format OK, but the label does not.  It is too short.

If I use the field selector, the label format is OK and the correct length:

#q46 label {width: 172px;}

Is my syntax OK for the statement using CSS class?

CSS Class:

Field Selector. Correct format:

0 0

Answer

SELECTED ANSWER
replied on December 15, 2016

It's because it is other built-in CSS has higher priority. You can just add"!important" to increase its priority.

.name1 label {width: 172px !important;}

1 0

Replies

replied on December 18, 2016

of course!

Thanks Xiang

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.