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

Question

Question

Number Field CSS Not Responding to width changes

asked on April 20, 2018

Hello, 

I am having some issues with fixing the size of my number field. I have highlighted the field in purple as you can see the field is extending beyond the red border, I would like to shrink it to fit but changes to the CSS are not responding. Could someone help me identify why I am doing wrong?


Code Below:

/*If you want to center buttons*/
//.btn-wrapper{width:100%; text-align:center}

/*This is useful when using pictures for a background*/
body {
  background-repeat: no-repeat; 
  background-position: center;
  background-attachment: fixed;
  background-size: cover;
}

 /*Displays two fields per line*/
.TwoPerLine{display: inline-block; width:365px;}
.TwoPerLine > .cf-field {width: 335px !important;}
.TwoPerLine .cf-medium {width:100%;}

 /*Displays deadline with dateline together switch solid to none in border style to make invisible or vise versa for testing*/
.requestdeadline {display: inline-block; width:215px;border-style:solid;border-color:red !important;}
.requestdeadline > .cf-field {width: 30px ;border-style:solid;border-color:green !important;}
.requestdeadline .cf-medium {width:80%;border-style:solid;border-color:blue !important;}
 /*Displays dateline with deadline fields together*/
.requestdateline {display: inline-block; width:365px;border-style:solid;border-color:red !important;}
.requestdateline > .cf-field {width: 30px ;border-style:solid;border-color:green !important;}
.requestdateline .cf-medium {width:80%;border-style:solid;border-color:blue !important;}

 /*Displays date and day group*/
.TwoDate{display: inline-block; width:215px;border-style:solid;border-color:red !important;}
.TwoDate > .cf-field {width: 168px !important;}
.TwoDate .cf-medium {width:80% !important;}
.totaldays {display: inline-block; width:110px;border-style:solid;border-color:red !important;}
.totaldays .cf-field {width: 33px; border-style:solid;border-color:purple !important;}
.totaldays .cf-small {width:33px;border-style:solid;border-color:blue !important;}



 /* Displays three fields per line */
.ThreePerLine {display: inline-block; width: 33%;}
.ThreePerLine .cf-small {width:100%;}

 /*Hides fields*/
.hide {display:none;}

/*This makes the background for read-only fields white instead of gray*/
.cf-formwrap input[readonly]{background-color:#ffffff!important;border:0px;}
.cf-formwrap select[readonly]{background-color:#ffffff!important;border:0px;}
.cf-formwrap textarea[readonly]{background-color:#ffffff!important;border:0px;}

 

Screen Shot 2018-04-20 at 12.49.07 PM.png
0 0

Replies

replied on April 20, 2018

The field width set in the Layout tab (small, medium, large, xlarge) probably does not match. Instead of the small size in .totaldays .cf-small (line 32 of your code above), you might try .cf-medium, .cf-large, or .cf-xlarge. 

0 0
replied on April 25, 2018

No its set to small, I have also tried setting it to medium and then changing the field to medium, and same with large this is a wierd bug.

 

 

0 0
replied on April 26, 2018

Please be advised this seems to be an issue with number fields instead of text fields.

Any fix? Is number fields a different CF class?

0 0
replied on April 26, 2018

Numbers will have both the class number and cf-small by default, so you should not need to target it with more classes. 

You may want to post your process as an XML so I can take a look. I can't tell which classes in your CSS match which fields in your screenshot.

0 0
replied on April 20, 2018

Hey Karina,

 

I have matched the number field as small to small and tried medium to medium no luck.

0 0
replied on April 24, 2018

I'd like to try and replicate this so I can help, but I'm not sure exactly which of your red-bordered fields have which classes (requestdeadline, requestdateline, etc.). 

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

Sign in to reply to this post.