-2

I made a small website where width of certain elements are given in vw. It looked all good in my laptop. But when viewed in a 1920 screen, I could see the content is over stretched. I want to know if there is a way to stop viewport width and viewport paddings I have used in my website to stop stretching the elements after a while.

Alon Eitan
  • 11,997
  • 8
  • 49
  • 58
Alexandra
  • 3
  • 2

1 Answers1

0

You can achieve this by setting max-width: value to your container in you css file

Also to set diverent styles after certain screen width you can yuse media query

@media(min-width: 1000px){
   //your style
}
RadekF
  • 476
  • 5
  • 10
  • Even after putting max width my elements get stretched. The container becomes left aligned. And I can see the body colour I used on the side of the screen. Container ends at 1020 but the contents continue to stretch past it – Alexandra Apr 20 '19 at 12:22