Computer Science, asked by kuhusingh3916, 11 months ago

Write css so that the header element is 80% width pf its parents and 10 pixel width of its parents section should be 80%

Answers

Answered by subhashinerout
1

Answer:

The width property in CSS specifies the width of the element's content area. This "content" area is the portion inside the padding, border, and margin of an element (the box model).

.wrap {

width: 80%;

}

In the example above, elements that have a class name of .wrap will be 80% as wide as their parent element. The accepted values are any of the length values, in addition to some keywords we'll cover later.

Width can be overridden by the closely correleated properties min-width and max-width.

.wrapperA {

width: 100%;

max-width: 320px; /* Will be AT MOST 320px wide */

}

.wrapperB {

width: 100%;

min-width: 20em; /* Will be AT LEAST 20em wide */

}

Similar questions