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

Question

Question

TwoPerLine alignment with single line

asked on November 18, 2019

So when I use TwoPerLine in my code it works great and ThreePerLine as well.  But what I don't like is when I put a single line below it the alignment looks off.  This should line up.  I've made a OnePerLine and that lines everything up but I really don't want to add CSS for just single line items.  Is there a way to modify the TwoPerLine to match the single line?

 

/*Displays one fields per line*/
.OnePerLine{display: inline-block; width:50%;}
.OnePerLine .cf-medium {width:97%;}
.OnePerLine .cf-small {width:97%;}

/*Displays two fields per line*/
.TwoPerLine{display: inline-block; width:50%;}
.TwoPerLine .cf-medium {width:97%;}
.TwoPerLine .cf-small {width:97%;}
 
 /* Displays three fields per line */
.ThreePerLine {display: inline-block; width:33%}
.ThreePerLine .cf-medium {width:97%;} 
.ThreePerLine .cf-small {width:97%;} 
 

TwoPerLine.JPG
TwoPerLine.JPG (25.7 KB)
0 0

Replies

replied on November 19, 2019

You're going to have to set the width for the Single Line to match the TwoPerLine fields. The native width of the field is too wide to go the other way around. The easiest thing to do is just make that single line also a "TwoPerLine" field so it matches up; it will still work even if there is only one field on that line.

If you have something after it that is also two or three per line and doesn't have a section or anything to separate them, then you could add an empty custom HTML element or a section with the header hidden to keep them separated.

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

Sign in to reply to this post.