From 7dcc9893d696504ec78aa381bb265dc9c29e9a07 Mon Sep 17 00:00:00 2001 From: "G. Wade Johnson" Date: Thu, 1 Oct 2015 14:02:35 -0500 Subject: [PATCH 1/2] Begin Sass version of CSS problem. --- top-nav-drill/.gitignore | 3 +++ top-nav-drill/main.scss | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 top-nav-drill/.gitignore create mode 100644 top-nav-drill/main.scss diff --git a/top-nav-drill/.gitignore b/top-nav-drill/.gitignore new file mode 100644 index 0000000..b08f28b --- /dev/null +++ b/top-nav-drill/.gitignore @@ -0,0 +1,3 @@ +.*.swp +.sass-cache +*.css.map diff --git a/top-nav-drill/main.scss b/top-nav-drill/main.scss new file mode 100644 index 0000000..eadceda --- /dev/null +++ b/top-nav-drill/main.scss @@ -0,0 +1,9 @@ +.container { + margin: 0 auto; +} + +/*Put your code here*/ +header { + color: #fff; + background-color: #fff; +} From cb43f2953c47b2bc192229422f26df1f6a84f502 Mon Sep 17 00:00:00 2001 From: "G. Wade Johnson" Date: Thu, 1 Oct 2015 14:34:23 -0500 Subject: [PATCH 2/2] Re-attempt problem using SASS this time --- top-nav-drill/main.css | 38 ++++++++++++++++++++++++++-- top-nav-drill/main.scss | 55 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 89 insertions(+), 4 deletions(-) diff --git a/top-nav-drill/main.css b/top-nav-drill/main.css index 9d37c16..1003144 100644 --- a/top-nav-drill/main.css +++ b/top-nav-drill/main.css @@ -1,5 +1,39 @@ .container { - margin: 0 auto; -} + margin: 0 auto; } /*Put your code here*/ +header { + background-color: #000; + font-family: sans-serif; + padding: 0.5em 0; } + header a { + color: #fff; } + header span { + padding: 0.5em 2em; + font-size: 180%; + font-weight: bold; } + header span a { + text-decoration: none; } + header span a:visited { + color: #fff; } + header nav { + float: right; + font-size: 80%; } + header nav ul { + padding-right: 1em; } + header nav li { + display: inline; + list-style-type: none; + padding-right: 1em; } + +.container > section { + width: 50%; + margin-left: 25%; + margin-right: 25%; } + .container > section h1 { + border-bottom: solid black 1px; } + +footer { + border-top: solid black 1px; } + +/*# sourceMappingURL=main.css.map */ diff --git a/top-nav-drill/main.scss b/top-nav-drill/main.scss index eadceda..47dc3e8 100644 --- a/top-nav-drill/main.scss +++ b/top-nav-drill/main.scss @@ -3,7 +3,58 @@ } /*Put your code here*/ +$header_color: #fff; +$header_bg: #000; + +$text_width: 50%; +$text_margin: (100% - $text_width)/2; +$separator: solid black 1px; + header { - color: #fff; - background-color: #fff; + background-color: $header_bg; + font-family: sans-serif; + padding: 0.5em 0; + a { + color: $header_color; + } + span { + padding: 0.5em 2em; + font: { + size: 180%; + weight: bold; + } + a { + text-decoration: none; + &:visited { + color: $header_color; + } + } + } + + nav { + float: right; + font-size: 80%; + ul { + padding-right: 1em; + } + li { + display: inline; + list-style-type: none; + padding-right: 1em; + } + } } + +.container > section { + width: $text_width; + margin-left: $text_margin; + margin-right: $text_margin; + + h1 { + border-bottom: $separator; + } +} +footer { + border-top: $separator; +} +