Categories
User Help Web Pro

Need help with CSS image position and background color

Hi i’m trying to move the black dove image to somewhere in the green header background. I tried using position relative, absolute together with margin, padding can’t seems to figure out how to push it there. You can download the HTML file here https://github.com/mdn/learning-area/blob/master/html/introduction-to-html/structuring-a-page-of-content-start/assets.zip?raw=true

The first that contains h1, this is my CSS:

header {

text-align: center;

height: 300px;

font-family: ‘Cinzel Decorative’, cursive;

padding-top: 5px;

clear: right;

background-color: #32CD32

}

For the dove.png image tag, this is my CSS:

.headerimg {

width: 150px;

height: 120px;

float: right;

}

I want to move the dove image into the green background header. Example here the dove is on the top right: https://media.prod.mdn.mozit.cloud/attachments/2016/02/09/12449/7591b0b929e32f5164d3496229799255/example-page.png

Also the background color for header is not occupying the entire browser screen for that div, can someone advise me on how to do both? thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *