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

Question

Question

Right Alignment on a field

asked on August 21, 2019

Been looking around on answers, tried different method on how to use CSS.  Never had experience using CSS before. I'm trying to right align 4 fields to the right (id: q133, q134, q135, q136).  I tried 1 field with the script below, it didn't work. 

#q133 .cf-field, #q133 .cf-label {
  width: 100% !important;
  text-align: right;
}

 

0 0

Answer

SELECTED ANSWER
replied on August 22, 2019 Show version history

This worked for me:

#q15 .cf-label {text-align: right;}
#q15 .cf-field {text-align: right;}
#q15 input {text-align: right;}
#q22 input {text-align: right;}
#q22 .cf-field {text-align: right;}
#q22 .cf-label {text-align: right;}
#q28 input {text-align: right;}
#q28 .cf-field {text-align: right;}
#q28 .cf-label {text-align: right;}

 

I also read somewhere on Answers that if you have any other inline block CSS affecting your fields, it will override other configurations.  Are you using the TwoPerLine or ThreePerLine on your target field?  Is there any other CSS in your form other than what you've shown?

0 0

Replies

replied on August 22, 2019 Show version history

So I removed all of the TwoPerLine/ThreePerLine in all of the other CSS … and you're right--- it works now.  Is there any way to make the .cf-label align to the left so not everything is to the right?  Thank you.

0 0
replied on August 22, 2019 Show version history

So, my example of my three right-aligned fields should work for you then.

0 0
replied on August 22, 2019

Yes it worked.  I figured out how to move the label to the left using this:

#q133 label {width: 700px;}

 

thank you for your help!

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

Sign in to reply to this post.