HighDots Forums  

Change spacing between lines

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Change spacing between lines in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nsv2
 
Posts: n/a

Default Change spacing between lines - 07-09-2004 , 04:37 AM






How do I change the spacing between lines of text inside a cell? Whenever I
add a large text heading (at the top) then add a second line with smaller text
there's a large gap in between. How do I make the gap smaller between the two
lines of text? I searched everywhere and can't find the answer.

PS. I just got Dreamweaver and I don't know HTML.

Thank you in advance.


Reply With Quote
  #2  
Old   
judas2
 
Posts: n/a

Default Re: Change spacing between lines - 07-09-2004 , 06:03 AM






I'm not sure to understand what you mean, but maybe you just need to press the
caps key when you press the return key (both together) so you won't insert a
<p> but just a <br>. If you need to change spacing between lines as in a word
processor then you should use the CSS?


Reply With Quote
  #3  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Re: Change spacing between lines - 07-09-2004 , 06:21 AM



nsv2 wrote:

Quote:
How do I change the spacing between lines of text inside a cell? Whenever I
add a large text heading (at the top) then add a second line with smaller text
there's a large gap in between. How do I make the gap smaller between the two
lines of text? I searched everywhere and can't find the answer.

PS. I just got Dreamweaver and I don't know HTML.

Thank you in advance.

You will need to control the two texts with CSS (Cascading Style Sheet),
assuming you don't have inserted an empty paragraph (you have hit
"enter") between the texts. If the latter, delete it. If the former, do
this:

1. Select "New style" in the CSS window.
2. In the dialog window that opens, select the option "re-define tag"
then use the drop down menu to select the head tag (h1-h5) you have
chosen for the headline.
3. At the bottom of the same dialog window, select if you want the
styles in that particular doc only, or as an external stylesheet. If you
suspect that you'll need the style for more than that page, go for the
"external" option and save the stylesheet somewhere in the site's root,
preferably in a new folder. Make sure the filename ends ".css".
4. When the above is done, you'll get all the various attributes you can
attach to the style. Test various settings. The margins/paddings can be
changed under "box".

Cheers,

--
Dan Vendel - *GOF*
Contact: http://www.proformica.com/en/contact.shtml
Formmail tutorial: http://www.proformica.com/en/formmail_tutorial.shtml
Nested tables: http://www.proformica.com/en/nested_table_demo.shtml
SEO: http://www.proformica.com/en/search_engine_optimization.shtml
SE Utility: http://www.proformica.com/en/advanced_web_ranking.shtml
Search Dreamweaver newsgroup: http://www.proformica.com/google.html


Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Change spacing between lines - 07-09-2004 , 07:46 AM



That's a bad answer, judas.

Recommending that someone change from <p> to <br> changes the behavior of
the text in a way that may be inappropriate for the page, and cosmetically
unacceptible. The better response is to recommend that they use CSS to
change the margin (top/bottom) on the <p> tag to accommodate the desired
line spacing. That way, the text will continue to flow in its container,
and not have hard line breaks.

Your recommendation is easy, but wrong (in my opinion).

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"judas2" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
don't know why my previous message is not complete:

? so you won't insert a p but just a br

Let's see if this way it works



Reply With Quote
  #5  
Old   
judas2
 
Posts: n/a

Default Re: Change spacing between lines - 07-09-2004 , 08:10 AM



Murray: I recommended 2 things and you point at just one. I said I didn't
exactly understand what the user wanted. But now let me understand? do you mean
that every line has to be a new paragraph and that I have always have to avoid
the use of br? That's quite interesting. If it is like this could you please
explain me why. I would be very grateful to you (as ever)


Reply With Quote
  #6  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Change spacing between lines - 07-09-2004 , 08:43 AM



No - that's not what I mean.

Here's an example.

I start typing in Dreamweaver, and press return. This gives me the
following -

<p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ac wisi.
Sed et urna nec wisi ornare porta. Suspendisse condimentum tellus nec ligula
lacinia commodo. Vivamus eros. Vestibulum libero erat, sodales eget,
imperdiet a, semper vel, nisl. Phasellus mollis auctor massa. </p>

and it places the cursor at a position that looks as if it has doublespaced.

I continue typing, and now I have this -

<p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ac wisi.
Sed et urna nec wisi ornare porta. Suspendisse condimentum tellus nec ligula
lacinia commodo. Vivamus eros. Vestibulum libero erat, sodales eget,
imperdiet a, semper vel, nisl. Phasellus mollis auctor massa. </p>
<p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ac wisi.
Sed et urna nec wisi ornare porta. Suspendisse condimentum tellus nec ligula
lacinia commodo. Vivamus eros. Vestibulum libero erat, sodales eget,
imperdiet a, semper vel, nisl. Phasellus mollis auctor massa. </p>

These two paragraphs (in the absence of any CSS) will appear to have a
double space between them. This is due to the default bottom margin of the
top </p> tag, and the default top margin of the bottom <p> tag. By using
CSS to specify an exact margin for the <p> tag, you will be able to bring
those and other paragraphs on the page closer together.

Now - imagine that the container (table cell - division - whatever) for that
text can grow or shrink in width, depending on the width of the browser
viewport. As long as the <p> tags are there, the text between then will
flow to fill the available width of the container in a visually pleasing
way.

If you had inserted a line-break instead of using CSS, then the line break
will always occur at that point regardless of how the text flows in the
available space. This could cause an unexpected cosmetic issue with the
appearance of the text in its container.

I am not saying to avoid the use of <br> at all. I am saying that to
recommend using <br> as a solution to the "double spacing" question may not
be the best response, or produce the best results, while the use of CSS
certainly will be.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"judas2" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Murray: I recommended 2 things and you point at just one. I said I didn't
exactly understand what the user wanted. But now let me understand? do you
mean
that every line has to be a new paragraph and that I have always have to
avoid
the use of br? That's quite interesting. If it is like this could you
please
explain me why. I would be very grateful to you (as ever)




Reply With Quote
  #7  
Old   
James Shook
 
Posts: n/a

Default Re: Change spacing between lines - 07-09-2004 , 09:03 AM



nsv2 wrote:

Quote:
How do I change the spacing between lines of text inside a cell? Whenever I
add a large text heading (at the top) then add a second line with smaller text
there's a large gap in between. How do I make the gap smaller between the two
lines of text? I searched everywhere and can't find the answer.

PS. I just got Dreamweaver and I don't know HTML.
Well, you'll have to learn some.... What tag are you using to make the
"large text heading"? What tag are you using to make "the second line of
smaller text"?

The answer to controlling the spacing between your text depends on how
it is structured. Let's assume your code looks like:

<h1>This is some big text</h1>
<p>This is the smaller line of text beneath it.</p>

All HTML elements have a default margin. In the example above, the space
you will see between the big text and the little text will be determined
by the default size a browser uses for the margins of the <h1> and <p> tags.

You can change this spacing be redefining margins using CSS.

--
James M. Shook
http://www.jshook.com


Reply With Quote
  #8  
Old   
judas2
 
Posts: n/a

Default Re: Change spacing between lines - 07-09-2004 , 10:00 AM



Murray, I perfectly agree with you. Nsv2 used the correc syntax. In fact
h=heading and not header as I was thinking (in italian there is written "Titolo
1" "Titolo 2"). I tried to explain to him the possibility to press enter
without creating a new paragraph (with double spacing). That's why I answered
this way. Now I believe that maybe Nsv2 didn't need my first answer. Maybe he
already knew it.


Reply With Quote
  #9  
Old   
judas2
 
Posts: n/a

Default Re: Change spacing between lines - 07-09-2004 , 10:11 AM



After the perfect answer of James Shook I still doubt of what Nsv2 really needs. By the way I ask to you all a thing: what about using different classes in the same paragraph? Is it not recommended?

Reply With Quote
  #10  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Change spacing between lines - 07-09-2004 , 10:24 AM



Why not? But I'm not sure I understand your question. Can you give me an
example?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"judas2" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
After the perfect answer of James Shook I still doubt of what Nsv2 really
needs. By the way I ask to you all a thing: what about using different
classes in the same paragraph? Is it not recommended?




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.