Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 84 additions & 3 deletions great-idea/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
License: none (public domain)
*/

* {
box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
Expand All @@ -16,13 +20,16 @@ article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
margin: 20;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding properties to a bunch of elements/classes at once is really efficient and it's a good coding practice when there's a use for it,, but I do want to caution you to think carefully about inheritance when you assign them like this. Many properties are inherited, but some are not -- and if the code you're writing applies to nearly every element on the page, it can be hard to predict and troubleshoot the changes you're making.

padding: 20;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;


}


/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
Expand Down Expand Up @@ -62,3 +69,77 @@ h1, h2, h3, h4, h5 {
letter-spacing: 1px;
margin-bottom: 15px;
}

h1 {
font-size: 80px;
}

.container {
width: 880px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a width to the container is a great way to make a predictable layout that will look the same every time. As we move into responsive layouts, I encourage you to think about the pros and cons of a fixed-width content container versus a responsive layout (or even just a different CSS property, like adding margins to the container).

margin: 0 auto;
}

header {
display: flex;
flex-direction: row;
justify-content: flex-start;
width: 100%;
}

header nav {
display: flex;
flex-direction: row;
justify-content: flex-start;
margin-top: 35px;
width: 75%;
}

header nav a {
margin-right: 65px;
font-size: 14px;
color: gray;
text-decoration: none;
}

header nav a:hover {
text-decoration: underline;
}


.cta {
margin-top: 100px;
display: flex;
flex-direction: row;
justify-content: flex-start;
justify-content: space-evenly;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you're assigning the justify-content property and then overwriting it on the next line. This shouldn't cause any problems while rendering, but it might be confusing to look at later on.

text-align: center;
}

.cta img {
flex-direction: row;
justify-content: flex-start;
}

.main-content .top-content {
display: flex;
flex-direction: row;
justify-content: space-evenly;

}

.main-content .bottom-content {
display: flex;
flex-direction: row;
justify-content: space-around;
}

.bottom-content .text-content {
width: 280px;
}

footer {
margin: 32px 0;
text-align: center;
font-size: 14px;
}

6 changes: 6 additions & 0 deletions great-idea/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ <h1>Innovation<br> On<br> Demand</h1>
<img src="img/header-img.png" alt="Image of a code snippet.">
</section><!-- cta -->



<section class="main-content">
<hr>
<div class="top-content">
<div class="text-content">
<h4>Features</h4>
Expand All @@ -64,8 +67,11 @@ <h4>Vision</h4>
<p>Aliquam elementum magna eros, ac posuere elvit tempus et. Suspendisse vel tempus odio, in interdutm nisi. Suspendisse eu ornare nisl. Nullam convallis augue justo, at imperdiet metus scelerisque quis.</p>
</div>
</div>
<hr>
</section><!-- main-content -->



<section class="contact">
<h4>Contact</h4>
<p>123 Way 456 Street<br>
Expand Down