• 0
Sign in to follow this  
Followers 0

Shortcode in TextBox - How to Set Background for Form only, Remove Extra lines


Question

Posted · Report post

Hi,

I'd like to be able to put a shortcode for Gravity Forms plus HTML in a Text Box to I can write media queries to call a smaller version of the Gravity Forms form for mobile. 

 

When I get this working, I'll want to use another textbox with different sizes of an image called by media queiries.

 

The problems I need help with:

1) How do I set the background-size of the form I've placed in the text box to match the size of the form fields. I tried using a class within html in the textbox to set background color, but it still effected the entire area of the text box, not just the background of the form. When I set background-size to smaller than auto or 100%, the form fields get reduced commensurately. Please see the form in the ORANGE full width section at http://whub34.webhostinghub.com/~videoh6/cidev2.com/

 

2) I am getting extra blank lines (see under "Move Date" and under "Free Quote Now" button), and figure that they are getting thrown by the shortcode in a bad interaction with WP. Nonetheless, I need to know how to get rid of them. I understand that I can't use [pl_raw] in a text box. I know that [pl_raw] can be used in a page or post, but I don't know how to bring a particular new post or page into an existing page such as at the above url.

 

Thanks!

 

-Bruce

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

Posted · Report post

Updating above post:

I figured out how to deal with the background (number 1 above)

 

But, I still need help with number 2 above.

 

Thanks,

Bruce

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Bruce

 

The form has a <p> tag which is adding the additional spacing on the move date etc.

 

Try adding the following to your custom css to remove

 

.gform_body p {
    margin: 0 !important;
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0