There’s a header div and it’s width should be the same with the screen(not the window).I tried to set it’s width to be 100%,
but When the browser window became narrower the div became narrower too, so when I scroll to the right, the header div isn’t long enough to the right.
How to make the div width not change with the window?
There’s a header div and it’s width should be the same with the screen(not
Share
You need to set the width of the div to a fixed width. So try
This will prevent the div from collapsing when the browser is resized unlike setting the width with a percentage. You may need to change the width to suite your needs or preference.
Further Reading:
http://coding.smashingmagazine.com/2009/06/02/fixed-vs-fluid-vs-elastic-layout-whats-the-right-one-for-you/