Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 130
  • Last Modified:

Formatting line height in page, table, table cell, form.

When I enter text separated with "enter" (carriage return)
both in a page and in a table cell it becomes a huge gap between the two lines. How do I make the gap smaller?

It looks like this:
This is how it is   the first line....
            This is the gap...how do I make this smaller?
This is how it is   the next line....

This is what I want:
This is what I want    the first line....
This is what I want    the next  line...

I want to make this work both for the page in general and
for table in general and individual table cells, and forms
also if possible.

Erot / Norway
0
erot
Asked:
erot
  • 3
  • 3
1 Solution
 
rafisternCommented:
If I understand what you want, it is to make lines of text on the screen be closer in an html page.

THis can only be done in IE4 or NS4. Add a style to the body of the page or the element desired like this:

<body style="line-height:0.8em">

for example will make all lines of text in the document be spaced at 80% of the default.

<td style="line-height:1.25em">

would space all lines of text in the table cell at 125% of the default.

Is this what you wanted to know? Tell me and I will submit as an answer.


0
 
slinkyCommented:
How are you putting an "enter" into the text?
Are you using <br>?

Alternatively, put each line in a separate table cell and
set the table up like
<table cellpadding=0 cellspacing=0>
0
 
erotAuthor Commented:
rafistern....thanks...can you supply a dummy answer so I
can give you the points.

Erot /Norway
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!

 
rafisternCommented:
The answer is my first comment.
0
 
erotAuthor Commented:
Hello again...I thougt your answer should work...but
the code only affects lines which has not been invoked by the
carriage return.

Eks: If I enter text in a table-cell untill I reach the right
cell-border (and keep on writing) then the next line get the smaller spacing. (but this was OK in the beginning...the result now is that these lines is printed on top of each other...but on the other hand..this was not the problem......so...

Eks: If I enter some text, but before I reach the right cell-border I hit the "Carriage-return".....then the line-hight is
unaffected......so how do I change this line-height?????
0
 
rafisternCommented:
Do you mean <br> or <p> by carriage return?

I cannot see any problem with the <br> tag in either IE or NS.

With the <p> tag you can do this <p style="margin-top:0em"> to cancel the line break that it introduces.
0
 
erotAuthor Commented:
Thank you for the answer.....
I got it right now...


0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now