Hi,
Would anyone know how to give 1 1/2 space between 2 para in html or using CSS ? I would like to give space a little more than using <br> and less than using<p> for next para.
Thanks,
Hi,
Would anyone know how to give 1 1/2 space between 2 para in html or using CSS ? I would like to give space a little more than using <br> and less than using<p> for next para.
Thanks,
No problemCode:p { padding-bottom: 1.5em; }
If 1.5em isn't exactly what you want, experiment.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Setting the margin property would be better, not least because it will be necessary to remove the existing margin:Originally Posted by Twey
MikeCode:p { margin: 0 0 1.5em; /* or 1.5em 0 0 to set the top margin */ }
Oops, yeah. Sorry, I can never remember those.
Padding = inside,
Margin = outside.
(writes 200 lines)
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Basically I am trying to have a different spacing in the paragraph in one of the table on 1 page. In this table the headings are of different line spacing. It should look something like this.
Heading 1
(spacing a little more than using <br> so I increased the line spacing using CSS)
Paragraph 1
(Same spacing as above)
Paragraph 2
(Spacing little more than above so I used <p></p> tag for it)
Heading 2
I am attaching the code. I am not even sure right now if its doable or not. I will greatly appreciate your help.
Thank you,
<p><span class="subheading3">
<a href="events.html">Events</a></span>
<br>
<span class="p" >June 28, 2005: <a href="events.html">"How much data is enough? When should additional studies no longer be done?"</a></span>
<br>
<span class="p"> June 28, 2005: <a href="events.html">Healthcare Ethics in Action: A one-day conference that will provide basic ethics education and skills for healthcare ethics committee members.</a>
Originally Posted by rjain
Not sure what you mean, if you want the space between lines in certain paragraphs to be different create classes for each type like -
In the stylesheet:
p.plushalf {
line-height:1.7;
margin-top:-.6ex;
}
In the HTML:
<p class="plushalf">Some text with<br>more spacing between lines</p>
Oddly enough the default line-height in my browser is 1.2 (used when no line-height is specified), anyways, you will need to play with these values to get the desired results which, will vary by font and browser but, generally look OK relatively speaking. The negative margin is to compensate for the fact that line-height is evenly distributed above and below each line, to get the paragraph to appear that it starts where a normal paragraph would start. Depending upon the layout, you may not need to bother with it.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Just alter the bottom margin for the heading. No need for tricks with other properties, and certainly no need to fiddle with forced line breaks.Originally Posted by rjain
Do you mean you want a little more spacing between a paragraph and a heading that follows it? If that's the case, then again just adjust the margin (top margin, this time) for the header.Paragraph 2
(Spacing little more than above so I used <p></p> tag for it)
Heading 2
Umm, why? Use heading elements properly, styling their size and font style (italics and boldness) if necessary with CSS.<span class="subheading3">
<span class="p" >More?
The class attribute shouldn't be used to start emulating elements that already exist. It makes a mockery of any notion of document structure. If you have headings, use heading elements. If you have paragraphs, use paragraph elements. If they don't appear quite the way you want them to, style them accordingly.
Your sample would be better marked-up as a table as there is a tabular relationship: the first column is a list of event dates, and the second column is a description of those events. Each row obviously indicates which event occurs on which date.
Mike
Bookmarks