All Your Web Are Belong To Us
I ran across this video while on http://www.worksmart-emarketing.com/ and thought it was awesome. Enjoy.
I ran across this video while on http://www.worksmart-emarketing.com/ and thought it was awesome. Enjoy.
The <form> tag in HTML is used to wrap data elements (textboxes, checkboxes, radio buttons, etc.) on a webpage to prepare them for submission to the server. Nearly every form you fill out on a website uses a tag of some sort. But there’s one cosmetic issue that plagues tags, they don’t ever display in true inline!
When you wrap data elements with a tag you will probably see that there is additional whitespace above and below the and </form> tags when you’re viewing the actual website. This is because the <form> tag doesn’t respect true inline styling when it is rendered (or rather the browser doesn’t treat tags with true inline styling). This can sometimes be annoying when you’re attempting to layout a precise spacing scheme for a website you’re working on.
The best solution is to include a style attribute in the tag specifying a display element as inline. So you may want to do this:
<form action=”test.php” method=”post” style=”display:inline”>
form elements here
</form>
This will get around the cosmetic issue of the extra whitespace on both sides, and gives the developer ultimate control in spacing choices.