Search code examples
htmlcssposition

how to adjust the header position so that it is slightly to the middle or inward?


How do I adjust the position of the header that has been marked as in the picture slightly inward or in the top center?.enter image description here

.header{
    display:flex;
    position:relative;
}
.header h1{
    position:fixed;
    width:100%;
    color:black;
    background:lightblue;
    padding:5px;
    text-align:center;
    border:3px solid lightblue;
    border-radius:8px;
    
}

this is the script i'm trying to set the position in css.I'm still a beginner so please help to solve this problem, thank you


Solution

  • .header{ width:50%, margin:auto; }