Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 132
  • 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
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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