Gravity Forms / jQuery UI Datepicker Too Narrow; or, { box-sizing: border-box }

image_pdfimage_print

Gary Jones whipped up an especially helpful little tip for Gravity Forms based on Paul Irish’s border-box advice. Seriously helpful stuff. As Paul said:

One of my least favorite parts about layout with CSS is the relationship of width and padding. You’re busy defining widths to match your grid or general column proportions, then down the line you start to add in text, which necessitates defining padding for those boxes. And ‘lo and behold, you now are subtracting pixels from your original width so the box doesn’t expand.

I’m right there with him. A bit of CSS applied to all elements fixes the problem:

stuff we dig

FYI: yes, the above are affiliate links, so we do make a small amount of money if you follow them over and buy what they're selling. Thank you for helping pay our hosting costs!

Dave Kuhar

Dave runs Transmit Studio, a media creation lab in San José. He's built more websites with WordPress than he can remember. He likes hearing himself talk and writing about himself in third person.

Leave a Comment