Jump to content

Full Width header in html


Recommended Posts

There are several ways to achieve your goal. You can assign a new class to your header container (If it's based on bootstrap it should be already classed .container) and then write the corresponding media query in your custom.css or global.css depending on your prestashop version.

@media (min-width:1200px) and (max-width:1489px) {
	.myclass 
  	{
		width:100vw;
	}

}

 

  • Thanks 1
Link to comment
Share on other sites

 

This should do it. Use it in your custom.css

 

Style your header elements separately and adjust according to your needs

	@media (min-width:1200px) and (max-width:1439px) {
	#header_primary_container {
      width:100vw;
      margin-left:0 !important;
      margin-right:0 !important;
	  max-width: 100vw !important;
      /* Padding will stay the same so you can have a safe "bleed" from the edges of the browser window */
  }
  
  .st_mega_menu_container > .container {
    margin-left: 0;
    margin-right: 0 !important;
  }
  .st_mega_menu_container #top_extra_container {
    width:100vw;
  }
}

 

  • Thanks 1
Link to comment
Share on other sites

On 3/21/2022 at 11:58 AM, Luis C said:

 

This should do it. Use it in your custom.css

 

Style your header elements separately and adjust according to your needs

	@media (min-width:1200px) and (max-width:1439px) {
	#header_primary_container {
      width:100vw;
      margin-left:0 !important;
      margin-right:0 !important;
	  max-width: 100vw !important;
      /* Padding will stay the same so you can have a safe "bleed" from the edges of the browser window */
  }
  
  .st_mega_menu_container > .container {
    margin-left: 0;
    margin-right: 0 !important;
  }
  .st_mega_menu_container #top_extra_container {
    width:100vw;
  }
}

 

Perfect, thank you!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...