I'm trying to move every single paragraph by 10 pixels from left using CSS by assigning a left margin of 10px
to p. However, they don't seem to be updating
CSS:
.container {
width: 680px;
height: 900px;
background-image: url("images/bgcontainer.jpg");
overflow: auto;
left: 10%;
right: 10%;
}
p {
margin-left: 10px;
}
HTML of paragraphs I'm trying to move:
<p align="left">
<h5 align="left" width="650px">Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
<a href="">exercitation ullamco</a>
laboris nisi ut aliquip ex ea.
</h5>
</p>
I just want the assigned property of the paragraph written in CSS to be applied and actually move the paragraphs.
tag can only contain inline elements. The header tags are block-level elements, and cannot go inside
tags even when you style them to display inline. so You should separate the paragraph,
from the heading, element or use div instead of p element. – Hiren Vaghasiya Jun 20 '19 at 07:58