The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I'm having trouble with a simple input form. In IE, there is a "space" created under the form. It's annoying, to say the least, when I"m working with very compacted height space... does anyone know a cross-compliant way to remove the "space" below the input form?!

This is a typical input tag that I will use. Let's breakdown the interesting parts.

size=<? if ($browser=="nav") { print"7";} else { print"15";}?>

Ever notice that input boxes are bigger on Navigator than on Internet Explorer? This can be an annoying if your layout starts to stretch. You can't fix this with javascript... at least as far as I know. I've really tried. You can't open script tags in the middle of an input tag and you can't size the box after the page loads. Resolution? PHP. Earlier in the doc, you do a browser detection:

Normally the default value of this box is "Product Search." Here I am telling the input that when the user clicks on the box, check to see if your value is "Product Search" -- if it is, that means the user wants to enter new data in the search box and you should clear yourself out.

If the value was not Product Search it means the user had already entered data into the box and they want to edit it, so don't clear. This little piece of code allows you to label your search boxes very clearly AND you don't require the user to delete the labeling before they try and use it.