Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to remove line above and below of <FORM>...</FORM>

Posted on 2003-10-26
6
Medium Priority
?
161 Views
Last Modified: 2010-04-09
I do not want the empty line above and below the Search TextField as shown by following code. How to remove them.
 
<HTML>
<BODY LEFTMARGIN=0 TOPMARGIN=0>

<TABLE align=center bgColor=#CCCCEE WIDTH=100%>
  <TR>
    <TD align=right vAlign=center width="50%">
      <B>MY COMPANY LOGO<B>
      <FORM name=SearchForm METHOD=POST>
          <INPUT maxLength=200 name=SEARCH_TEXT>
          <INPUT name=Search type=submit value=Search>
      </FORM>
    </TD>
  </TR>
</TABLE>

</BODY>
</HTML>
0
Comment
Question by:javaq092999
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Author Comment

by:javaq092999
ID: 9625179
Answering Myself (javaq):

Use following...

<HEAD>
<STYLE TYPE="text/css">
    FORM {margin-top: 0; margin-bottom: 0;}
</STYLE>
</HEAD>
0
 
LVL 31

Accepted Solution

by:
seanpowell earned 200 total points
ID: 9626455
Just so you know, you can also do this:

<STYLE TYPE="text/css">
<!--
    FORM { display: inline; }
//-->
</STYLE>


or this:

<STYLE TYPE="text/css">
<!--
    FORM { margin: 0px; }
//-->
</STYLE>
0
 
LVL 1

Expert Comment

by:tlp560
ID: 9636455
Just move the <FORM tag out off the table, no CSS involved, like this .:

<FORM name=SearchForm METHOD=POST>
<TABLE align=center bgColor=#CCCCEE WIDTH=100%>
  <TR>
    <TD align=right vAlign=center width="50%">
      <B>MY COMPANY LOGO<B>
          <INPUT maxLength=200 name=SEARCH_TEXT>
          <INPUT name=Search type=submit value=Search>
     </TD>
  </TR>
</TABLE>
</FORM>
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 31

Expert Comment

by:seanpowell
ID: 9636533
That will remove the space inside the table - but it still creates the extra padding below the form - so if you have the following - you won't be able to get the 2 tables to be adjacent.

<FORM name=SearchForm METHOD=POST>
<TABLE align=center bgColor=#CCCCEE WIDTH=100%>
  <TR>
    <TD align=right vAlign=center width="50%">
      <B>MY COMPANY LOGO<B>
          <INPUT maxLength=200 name=SEARCH_TEXT>
          <INPUT name=Search type=submit value=Search>
     </TD>
  </TR>
</TABLE>
</FORM>
<TABLE align=center bgColor=#ff0000 WIDTH=100%>
  <TR>
    <TD align=right vAlign=center width="50%">More text here...</TD>
  </TR>
</TABLE>

That's why I prefer to set the form properties in the stylesheet - it simply removes the problem alltogether!
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9640512
Thanks javaq - and thanks for the A :-)
0
 

Author Comment

by:javaq092999
ID: 9641344
Though I answered myself but thought of acknowleding your (georgemarian) correct response. Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question