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
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
Business Studies,
5 months ago
Science,
5 months ago
Math,
5 months ago
Computer Science,
11 months ago
Computer Science,
11 months ago
Math,
1 year ago
English,
1 year ago