Solved

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

Posted on 2003-10-26
6
155 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 50 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
Technology Partners: 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!

 
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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Search Item in Table 2 43
how to customize the text in the legend in highcharts 3 35
Read text on Table 7 30
Check input text, Number 7 36
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

726 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