Magento – Magento 2 page-header background color

cssheadermagento2

I want to change the background color to black on luma theme page-header. i am using luma as my default template – what is the best way to go about? –
I am using github version fresh Magento 2 install, the templates are store in frontend/Magento/Luma – firebug directs me to {.page-header} pub/static/frontend/Magento/luma/en_US/css/styles-l.css

Best Answer

The easiest way to add simple styling to a magento 2 store is to add your code here:

ADMIN > CONTENT > Design > CONFIGURATION

Click Edit for the appropriate view (global, website or store) and Theme (in your case Luma):

Open tab HTML Head, under Scripts and Style Sheets, you can add the following:

<style type="text/css">
@media (min-width: 768px), print {
 .page-header {
   background-color: black
}
</style>

Click Save Configuration

Clear Cache

Related Topic