Creating a website to practice html/css. Having trouble moving the position of my h1
and #logo
image.
body {
text-align: center;
background: url(/images/bg.png);
background-size: cover;
font-family: sans-serif;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center center;
position: absolute;
width: 100%;
display: block;
}
p {
text-align: center;
font-size: 24px;
font-family: sans-serif;
}
h1 {
display: inline-block;
color: black;
position: relative;
top: -90%;
text-align: center;
text-indent: 10px;
font-size: 20px;
}
h1:hover {
color: #B40400;
}
#logo {
top: 50%;
}
<a href="http://www.example.com">
<h1>Test</h1>
</a>
<img border="0" id="logo" src="http://placehold.it/420x120" alt="MAL." width="420" height="120">
<h1>Test1</h1>
<h1>Test2</h1>
<h1>Test3</h1>
<h1>Test4</h1>
<h1>Test5</h1>
Please help! Thanks.