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

Question

Question

Forms Inline not setting specific fields together

asked on September 27, 2018

I'm setting specifically 2 fields per line with CSS

#q3, #q4 {display: inline-block;}
#q29, #q5 {display: inline-block;}
#q6, #q7 {display: inline-block;}
#q8, #q9 {display: inline-block;}
#q11, #q10 {display: inline-block;}
#q20, #q21 {display: inline-block;}
#q22, #q23 {display: inline-block;}
#q24, #q25 {display: inline-block;}
#q26, #q27 {display: inline-block;}

But it is forcing a third on the row.  Any reason it is not pairing each two that I specify?

0 0

Answer

SELECTED ANSWER
replied on September 27, 2018

Hi Chase, 

 

You have to specify the width as well. 

 

The first line is for 2 fields to be next to each other and the one below is if you want to space 3 fields next to each other. 

 

#q1, #q2 {float:left; display:inline; width: 49%; text-align: left;}

#q1, #q2, #q3 {float:left; display:inline; width: 33.33%; text-align: left;}

 

4 0

Replies

replied on September 27, 2018

Ah makes sense. If the default width of the field makes up less than that is auto wraps the third in. 

Thanks!

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

Sign in to reply to this post.