Solved

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

Posted on 1998-12-17
7
121 Views
Last Modified: 2010-04-09
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
Comment
Question by:erot
  • 3
  • 3
7 Comments
 
LVL 4

Expert Comment

by:rafistern
ID: 1840714
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
 
LVL 1

Expert Comment

by:slinky
ID: 1840715
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
 

Author Comment

by:erot
ID: 1840716
rafistern....thanks...can you supply a dummy answer so I
can give you the points.

Erot /Norway
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 4

Accepted Solution

by:
rafistern earned 40 total points
ID: 1840717
The answer is my first comment.
0
 

Author Comment

by:erot
ID: 1840718
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
 
LVL 4

Expert Comment

by:rafistern
ID: 1840719
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
 

Author Comment

by:erot
ID: 1840720
Thank you for the answer.....
I got it right now...


0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

708 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