I am currently working on a website that includes different section titles such as About, Projects, Contact, and more.
To make these titles stand out against the background image, I have decided to fill them with white. The text color of the titles is dark blue.
However, simply setting a background-color causes the elements to stretch across the page. I need each title to have a custom width, along with 3px padding of white around them. Do I have to create a separate CSS style class for each title and specify a width for them?
All the titles are formatted as < h3 > elements.
Below is the CSS style I am currently using:
.sectionTitle {
background-color: #ffffff;
padding: 3px;
}