diff --git a/components/Box/Box.css b/components/Box/Box.css index e69de29..7102e01 100644 --- a/components/Box/Box.css +++ b/components/Box/Box.css @@ -0,0 +1,48 @@ +.Box__h1 { + border: none; +} + +nav { + padding: 10px; +} + +.Box__navDropdown{ + border: 2px solid black; + padding: 15px; + width: 100px; +} + +.Box__navButtons { + display: none; + flex-direction: column; + justify-content: center; + padding: 10px 0 10px 0; + margin-top: 15px; + border: 2px solid black; + width: 100px; + position:fixed; + background: white; +} +a{ + padding: 5px 0 5px 15px; +} + +.Box__placeholder { + padding: 0 20px 0 20px; + width: 100%; + margin: 0; + border: 2px solid black; + /*display: flex;*/ +} + +.Box__text{ + display:flex; +} + +@media(min-width: 401px){ + .Box__text { + width: 100%; + justify-content: center; + position: fixed; + } +} \ No newline at end of file diff --git a/components/Section/Section.css b/components/Section/Section.css index e69de29..2440e81 100644 --- a/components/Section/Section.css +++ b/components/Section/Section.css @@ -0,0 +1,20 @@ +.Section { + border: 2px solid black; + +} + +.Section__header { + display: flex; + align-items: center; + padding-left: 10px; + border-bottom: none; +} + +@media(min-width: 401px){ + .Section__info { + display: flex; + flex-direction: row; + align-self: stretch; + justify-items: stretch; + } +} \ No newline at end of file diff --git a/index.html b/index.html index 39167c5..fb2c385 100644 --- a/index.html +++ b/index.html @@ -1,9 +1,34 @@ - + Introduction to the DOM - + + + +
+ +
+

Header

+
+
+
+
+

Placeholder

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce risus nibh, gravida nec felis quis, facilisis facilisis lectus. Nulla ac orci pretium, condimentum orci quis, accumsan nisi. Aliquam erat volutpat. Curabitur cursus mattis libero, at viverra risus hendrerit quis. Fusce imperdiet tristique tortor non tincidunt. Mauris accumsan urna nec augue feugiat porta. Proin vitae magna in ex malesuada laoreet eget a nulla. Aliquam tristique et elit at consequat. In hac habitasse platea dictumst.

+
+
+

Placeholder

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce risus nibh, gravida nec felis quis, facilisis facilisis lectus. Nulla ac orci pretium, condimentum orci quis, accumsan nisi. Aliquam erat volutpat. Curabitur cursus mattis libero, at viverra risus hendrerit quis. Fusce imperdiet tristique tortor non tincidunt. Mauris accumsan urna nec augue feugiat porta. Proin vitae magna in ex malesuada laoreet eget a nulla. Aliquam tristique et elit at consequat. In hac habitasse platea dictumst.

+
+
-
\ No newline at end of file + \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..e4c3c95 --- /dev/null +++ b/index.js @@ -0,0 +1,28 @@ +// ________ VARIABLES ________ +const navButtons = document.getElementById('navButtons'); +const navDropdown = document.getElementById('navDropdown'); +let navButtonOn = true; +let cursor = 'default'; + +// ________ NAV DROPDOWN ________ +function displayNavButtons() { + navButtonOn = !navButtonOn; + if (!navButtonOn){ + navButtons.style.display = 'none'; + } + else navButtons.style.display = 'flex'; +} + +function cursorDefault() { + document.body.style.cursor = 'default'; +} + +function cursorDropdown() { + document.body.style.cursor = 's-resize'; +} + +console.log(navButtons); + +navDropdown.addEventListener('mouseover', cursorDropdown); +navDropdown.addEventListener('mouseout', cursorDefault); +navDropdown.addEventListener('click', displayNavButtons); \ No newline at end of file diff --git a/styles.css b/styles.css index 997c895..5a271f4 100644 --- a/styles.css +++ b/styles.css @@ -1,8 +1,16 @@ @import './components/Section/Section.css'; @import './components/Box/Box.css'; +* { + box-sizing: border-box; +} body { - box-sizing: border-box; min-width: 300px; margin: 0; + display: flex; + flex-direction: column; +} + +h1 { + font-size: 36px; }