asked 8.0k views
2 votes
provide a style rule to set the width of the page body to 90% of the browser window ranging from 320 pixels up to 960 pixels.

asked
User Botbot
by
8.5k points

1 Answer

1 vote

Final answer:

To achieve the desired width for the page body, a CSS rule can be applied specifying the body's width as 90% of the viewport with a minimum width of 320 pixels and a maximum width of 960 pixels.

Step-by-step explanation:

To set the width of the page body to 90% of the browser window while specifying a minimum width of 320 pixels and a maximum width of 960 pixels, you can use the following style rule:

body {
width: 90%;
min-width: 320px;
max-width: 960px;
}

This CSS rule will ensure that the body of your webpage is responsive, expanding and contracting based on the size of the browser window, but it will never be narrower than 320 pixels or wider than 960 pixels.

answered
User Roka
by
8.0k points