Forum Moderators: not2easy
I have a div with some text in it.
I want to have several paragraphs and am using the <br> tag to separate them.
Is there an easy way to have the paragraphs with a background color but leaving the blank line the same color as main main background that is white ?
All I get at the moment is all of my text and blank lines in one color.
Kind Regards
Digby
margin and padding come next:
- a margin pushes the other blocks away, but there's no background color of the element itself under the margin.
- padding is does more or less the same but the background of the element does go under this
Do note that <p> tags in most browsers have a default margin, you might want to reset it.
I have tried classes, and spans to no avail.
Can someone help me with some simple syntax for my css and my html ?
I have looked at lots of tutorials, but can't find an example of what I want, or one that is easy to understand.
<div>
<p class="paragraphA">Some Text</p>
<p class="paragraphB">Some Text</p>
<p class="paragraphC">Some Text</p>
</div>
if you have external CSS file then use <link type="text/css" rel="stylesheet" href="style.css" /> to include the CSS file.