Solved

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

Posted on 2003-10-26
6
149 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
  • 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Pass data between components in angular 1.5 10 70
CSS/audio questions 2 48
Help with HTML 7 39
jQuery value within div undefined 3 20
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now