Here is another for my previous question:
Is it impossible to have 2 blank lines between p tag? Markdown
After various comments given, I once thought I can manage it;
in fact, I cannot.
--------
br
--------
A
B
--------
p tag
--------
A
B
--------
OK, now, I want to insert 2 lines instead of 1 between A and B elements without any modification of the original elements;
The result I expect is like this (br emulation)
--------
A
B
--------
trying with p tag
--------
A
B
--------
Ouch!! 3 lines inserted instead of 2.
so, is there no way to do this by HTML and CSS??
The code: http://jsfiddle.net/LhDFs/9/
--------<br>
## br<br>
--------<br>
A<br>B
<br>--------<br>
## p tag
<br>--------
<p>A</p>
<p>B</p>
--------<br>
## OK, now, I want to insert 2 lines instead of 1 between A and B elements without any modification of the original elements;<br>
## The result I expect is like this (br emulation)
<br>--------<br>
<br>
A<br><br><br>B
<br>
<br>--------<br>
## trying with p tag
<br>--------<br>
<p>A</p>
<p style = 'margin: 0;'> </p>
<p>B</p>
--------<br>
## Ouch!! 3 lines inserted instead of 2.
<br> ## so, is there no way to do this by HTML and CSS??
Edit: some people mention that my understanding to HTML is immature, well I won't deny it; however, what people said is about HTML restriction.
To make things clearer, this is for HTML+js coding, not static. So, again I want to insert 2 (or any number ) lines instead of 1 between A and B elements without any modification of the original elements;
Because the function is not to modify the original context but to insert blank lines. What I intend is to insert things. When I insert things, if I need to modify the original context, more complicated and things generally don't go well. So, if it is really impossible to insert exact lines between original elements, I gave up and make a mess to modify original context. What I would like to know is if it's possible or impossible.
If it's really impossible, just tell me so instead of giving me some codes.
Thank you.
Edit:
I conclude it is not possible to insert the exact lines as long as the default paragraph tag context exists.
So, instead, the whole context should be constructed with 'noMargin' paragraph tag.
http://jsfiddle.net/LhDFs/10/
<p class="noMargin">No margin</p>
<p class="noMargin"> </p>
<p class="noMargin"> </p>
<p class="noMargin">No margin</p>
css
p.noMargin {
margin: 0;
}
or simply
<p>No margin</p>
<p> </p>
<p> </p>
<p>No margin</p>
css
p{
margin: 0;
}
The credit goes to
@3dgoo
Is it impossible to have 2 blank lines between <p> tag? Markdown
Thank you everyone, and if someone had unpleasant feelings on my post, my apologies.