End Form Element Layout Issues With CSS


End Form Element Layout Issues With CSS

Seasoned web designers are all too familiar with form element margins. More often than not, the form element will break the layout on one of the major browsers, because of how the browser handles the default margins of that element. A common fix for handling the strange margin problems that occur is to move the form elements around in the HTML until the layout renders correctly.

Fortunately, CSS provides an extremely simple solution to the rogue margins of form elements. If you set the form element’s margin to zero in CSS, margins will no longer be an issue.

form { margin:0; }

It’s an easy fix to an ongoing and annoying problem in web design.

Comments are closed on this post