I have two div elements inside a my body.
The first div is position:fixed, but when I add a paragraph to the second div, the first div moves down from the top of the page by ~20px.
How is adding a paragraph to one div, affecting the positioning of a previous div on the layout?
In the following code, there is one paragraph in the second div. This is the paragraph I am referring to.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Photography</title>
</head>
<body bgcolor="#c0bbbb" style="margin:0;padding:0">
<div style="
background-color:#717777;
height: 50px;
width: 100%;
position:fixed;
padding: 30px;
">
<h1 style="color:#ffffff; margin: 0;" >WESBITE</h1>
<h2 style="color:#282828; margin: 0;" >This is a test website</h1>
</div>
<div>
<p align="center" ></p> <!--If I comment this out, the previous div is aligned properly-->
</div>
</body>
</html>