Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Gravity Forms Responsive (left/right )?

I'm using the Gravity Forms WordPress Form plugin.

They provide CSS classes and I'm using gf_left_half and gf_right_half to make the fields align left and right on the same line.

How can I make them stack top/bottom when you drag in the window (responsive/mobile view)?

My form: http://goo.gl/sDWLO

like image 619
Chris Avatar asked Jan 28 '13 21:01

Chris


1 Answers

If your theme is responsive you most likely have a custom css file if you don't you can use this code, just declare all your responsive class defs in the @media section.

@media only screen and (min-width: 200px) and (max-width: 768px) {

  .gform_wrapper .gform_body .top_label li.gfield.gf_right_half { 
    float: left; 
    clear: left !important;
    width: 99%;
  } 

  .gform_wrapper .gform_body .top_label li.gfield.gf_left_half { 
    float: left; 
    clear: left !important;
    width: 99%;
  }

}
like image 127
Brad Hokanson Avatar answered Sep 21 '22 13:09

Brad Hokanson