diff --git a/code/index.css b/code/index.css new file mode 100644 index 0000000..28fda22 --- /dev/null +++ b/code/index.css @@ -0,0 +1,32 @@ +.flex-container { + /* We first create a flex layout context */ + display: flex; + + /* Then we define the flow direction + and if we allow the items to wrap + * Remember this is the same as: + * flex-direction: row; + * flex-wrap: wrap; + */ + flex-flow: row wrap; + + /* Then we define how is distributed the remaining space */ + justify-content: space-around; + + padding: 0; + margin: 0; + list-style: none; + } + + .flex-item { + background: tomato; + padding: 5px; + width: 200px; + height: 150px; + margin-top: 10px; + line-height: 150px; + color: white; + font-weight: bold; + font-size: 3em; + text-align: center; + } \ No newline at end of file diff --git a/code/index.html b/code/index.html index eb8f676..285bba1 100644 --- a/code/index.html +++ b/code/index.html @@ -12,12 +12,12 @@ - +