Git Product home page Git Product logo

quiz-css-layout's Introduction

Box Model & Page Layout

???

CSS Layout Quiz

?: Which CSS property is used to set the spacing outside of elements?

( ) spacer (X) margin ( ) padding ( ) border

?: Which CSS property is used to set the spacing inside of elements?

( ) spacer ( ) margin (X) padding ( ) border

?: Which CSS property is used to create a line (stroke) on the outside edge of elements?

( ) spacer ( ) margin ( ) padding (X) border

?: Select the CSS shorthand declaration that accomplishes the result of 5px of padding on all sides of an element.

(X) padding: 5px; ( ) padding-all-sides: 5px; ( ) padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; ( ) padding: 5px all;

?: Select the CSS shorthand declaration that accomplishes the result of 10px of padding on the top and bottom and 20px on the left and right of an element.

( ) padding-top-and-bottom: 20px; padding-left-and-right: 20px; ( ) padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding -right: 20px; (X) padding: 10px 20px; ( ) padding: 20px 10px;

?: Select the CSS shorthand declaration that accomplishes the result of 35px of padding on the top, 5px on both sides (left & right), and 10px on the bottom.

( ) padding-top: 35px; padding-left, padding-right: 5px; padding-bottom: 10px; ( ) padding: 35px 10px 5px; ( ) padding: 35px 10px 5px 10px; (X) padding: 35px 5px 10px;

?: Select the CSS shorthand declaration that accomplishes the result of 10px of padding on top, 20px on the right, 25px on the bottom, and 0px on the left.

( ) padding-top: 10px; padding-right: 25px; padding-bottom: 25px; padding-left: 0; ( ) padding: 0px 25px 20px 10px; (X) padding: 10px 20px 25px 0; ( ) padding: 10px top 20px right 25px bottom 0 left;

?: Select the CSS declaration that will center an element (using spacing outside of the element).

( ) margin: auto 0; (X) margin: 0 auto; ( ) margin-all: auto; ( ) margin: center;

?: If an element set to display: block; has a specified height property, an overflow property set to auto, and content inside that is taller than the element's specified height, a scrollbar will appear.

(X) TRUE ( ) FALSE

?: If an element is set to display: block; and has no width specified (or width: auto;) it will collapse only as wide as the content inside of it.

( ) TRUE (X) FALSE

?: If an element is set to display: inline;, it will not apply top or bottom margins or any width values given to it.

(X) TRUE ( ) FALSE

?: The margins of two statically positioned elements will overlap. (E.g., <div id="one"> has a bottom margin of 10px and <div id="two"> has a top margin of 20px, but the total margin between them is only 20px.)

(X) TRUE ( ) FALSE

?: If an element is set to display: block;, which CSS declaration will allow the element to scale to a width of 100%?

( ) width: auto; ( ) width: 100%; ( ) (Blank; no width declaration is necessary.) (X) All of the above.

?: If an element is set to display: block;, which CSS declaration(s) will set its minimum width to 600px and its maximum to 1000px?

( ) width: 1000px; minimum-width: 600px; (X) min-width: 600px; max-width: 1000px; ( ) width: > 600px < 1000px; ( ) width: 600px 1000px;

?: Which CSS property has the ability to change the way elements display (inline versus block)?

( ) visibility ( ) overflow (X) display ( ) Both A and B.

?: Select the most appropriate CSS declaration to position a <div> element so that other elements that follow after it may occupy space to the right of it.

(X) float: left; ( ) float: none; ( ) position: left; ( ) position: right;

?: Select the most appropriate CSS declaration to position a <div> element so that other elements that follow after it may occupy space to the left of it.

( ) position: right; ( ) float: none; ( ) position: left; (X) float: right;

?: When the CSS declaration clear: both; is applied to an element, it will appear below any floating elements above.

(X) TRUE ( ) FALSE

?: You can apply a specially written class of clearfix to parents with floating children to prevent the parents from collapsing.

(X) TRUE ( ) FALSE

?: Select the most appropriate CSS declaration(s) to set an element to absolute positioning in the top right corner.

( ) position: top right; (X) position: absolute; top: 0; right: 0; ( ) position: absolute; top: 0; left: 0; ( ) None of the above.

?: Fill in the blank: ________ positioning makes an element appear in the same place relative to the browser window even when scrolling occurs.

( ) absolute ( ) static (X) fixed ( ) inherent

?: Fill in the blank: Elements with a(n) _________ z-index will appear above other elements.

( ) lower (X) higher ( ) identical ( ) negative

???

View CSS Layout Quiz on Learn.co and start learning to code for free.

quiz-css-layout's People

Contributors

annjohn avatar fislabstest avatar fs-lms-test-bot avatar gj avatar jongrover avatar vanessadean avatar victhevenot avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quiz-css-layout's Issues

The wording for Question 12 should be changed.

Currently, Question 12 states: "The margins of two statically positioned elements will overlap. (E.g., <div id="one"> has a bottom margin of 10px and <div id="two"> has a top margin of 20px, but the total margin between them is only 20px)".

The accepted answer to this question is "true". However, this does not take into account whether the element is block-level or inline. Elements are statically positioned by default. However, some elements display block-level by default, while others display inline. This is important because it affects the margins.

Question 12, as it is written, is only true for block-level elements - their margins overlap. However, inline elements have left and right margins that add together instead of overlapping. So, the question is false for inline elements.

My suggestion is to change Question 12 to something like this: "The margins of two statically positioned block-level elements will overlap...". The rest of the question is fine as is.

Thanks a lot for looking into this!
Sdcrouse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.