|
INTERVIEW QUESTIONS
WEB
CSS
DETAILS
Question: Why was the decision made to make padding apply outside of the width of a 'box', rather than inside, which would seem to make more sense?
Answer: It makes sense in some situations, but not in others. For example, when a child element is set to width: 100%, I don't think it should cover the padding of its parent. The box-sizing property in CSS3 addresses this issue. Ideally, the issue should have been addressed earlier, though.
|
|
|
Category |
CSS Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8588 users |
Added on |
4/2/2013 |
Views |
69985 |
Rate it! |
|
|
Question:
Why was the decision made to make padding apply outside of the width of a 'box', rather than inside, which would seem to make more sense?
Answer:
It makes sense in some situations, but not in others. For example, when a child element is set to width: 100%, I don't think it should cover the padding of its parent. The box-sizing property in CSS3 addresses this issue. Ideally, the issue should have been addressed earlier, though. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Why call the subtended angle a "pixel", instead of something else (e.g. "subangle")?
|
View Answer
|
|
What is attribute selector?
|
View Answer
|
|
What is parent-child selector?
|
View Answer
|
|
How can I specify background images?
|
View Answer
|
|
How do I have a fixed (non-scrolling) background image?
|
View Answer
|
|
What are inline, block, parent, children, replaced and floating elements?
|
View Answer
|
|
Which set of definitions, HTML attributes or CSS properties, take precedence?
|
View Answer
|
|
How do I eliminate the blue border around linked images?
|
View Answer
|
|
How do I combine multiple sheets into one?
|
View Answer
|
|
Why does my content shift to the left on some pages (in FF)?
|
View Answer
|
|
How do I place text over an image?
|
View Answer
|
|
Which browsers support CSS?
|
View Answer
|
|
How can you set a minimum width for IE?
|
View Answer
|
|
What does ABCD (and ABCDE) mean?
|
View Answer
|
|
How do I have a background image that isn't tiled?
|
View Answer
|
|
What is alternate Style Sheet? How to link?
|
View Answer
|
|
What is contextual selector?
|
View Answer
|
|
What is ID selector?
|
View Answer
|
|
What is embedded style? How to link?
|
View Answer
|
|
What is imported Style Sheet? How to link?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All CSS Interview Questions & Answers - Exam Mode /
Learning Mode
|