I am a beginner at CSS and HTML and I am coding a landing page for an upcoming application. I am trying to align the title (image) on the page roughly in the center, but higher up on the y axis.
Please can you tell me why the CSS in this code is not repositioning the image but retaining the image in the top left hand corner?
<header><title>title</title></header>
<style type="text/css">
body {
background-image:url('Background.png');
}
title {
top:30px;
right:50px;
}
</style>
<body>
<div class=body></div>
<div class=title><img src='title.png'></img></div>
</body>
You need to give it a position property. Also, your selector isn’t correct: