How to make a background accross the screen (width:100%) in a proper way?

hello everyone,
i got a few divs in my website that are used to make a background color across the screen with a width of 100%, however the problem is that screens that doesn’t see all the content (having a vertical-scrollbar) when they scroll to the sides they’ll see uncolored background

my question is how to make the bg color affect the whole page even when the content is over the viewpoint

i hope you understood what i mean, im at uni atm so i cannot show any example but i think its easy enough to understand :slight_smile:

thanks,
ulthane

Presumably your content won’t be width 100%, so set a min-width on the color divs so that they can’t get smaller than the content.

Yes as Ralph said you will need to set a min-width (in pixels or ems) on each 100% element equivalent to the largest fixed width element it contains. If all containers are within a main parent then addressing the main parent should suffice.

thanks, that solved the issue :slight_smile: