Home › Forums › CSS › width:100%; and fix width problem › Reply To: width:100%; and fix width problem
November 9, 2013 at 7:37 am
#155532
paulob
Participant
Hi,
Do you mean that the 100% element shrinks with the viewport but when you scroll to see the content off to the right because of some fixed width content the background colour is no longer around the fixed width element?
If so then find the largest fixed-width item in your page (say 1000px) then set a min-width of 1000px on the 100% wrapper (min-width:1000px). This will ensure the background doesn’t keep shrinking when the viewport is smaller than the fixed width element.