Home › Forums › CSS › [Solved] Add background to title in header › Reply To: [Solved] Add background to title in header
October 16, 2015 at 2:24 pm
#209815
buildawesomewebsites
Participant
Try this:
.title {
text-align: center;
}
.title h1 {
display: inline-block;
margin-top: 100px; // or something to push it down, may need to adjust
padding: 20px; //however much border you need around the title
background: rgba(0,0,0,0.5); //whatever background color you want
}
Also, make sure to remove all the absolute positioning and 100% width that are currently on the .title h1 selector.