Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jonathan Gistand - Responsive-Web-Design-II #875

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
307 changes: 306 additions & 1 deletion css/index.css
Original file line number Diff line number Diff line change
@@ -1 +1,306 @@
/* Use your CSS from RWD - I here. IF you don't have CSS, use the solution CSS from RWD - I*/
/* Use your CSS from RWD - I here. IF you don't have CSS, use the solution CSS from RWD - I*/

/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
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 {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

/* Set every element's box-sizing to border-box */
* {
box-sizing: border-box;
}

html, body {
height: 100%;
font-family: 'Titillium Web', sans-serif;
font-size: 62.5%;
}

h1, h2, h3, h4, h5 {
font-family: 'Bangers', cursive;
letter-spacing: 1px;
margin-bottom: 15px;
}

/* -------------------------------------- */

.navigation {

display: flex;
flex-direction: row;
justify-content: center;
max-width: 75%;

}

a {
margin: 3%;
font-weight: bold;
font-size: 1.8rem;
padding-top: 24px;
padding-bottom: 16px;
padding-right: 32px;
color: #E2E5E8;
text-decoration: none;
max-width: 75%;
}


.idea-img {
display: inline-block;
position: absolute;
top: 45px;
right: 175px;

}

.header {
display: flex;
justify-content: center;
align-content: space-around;
margin: 2rem;
}

.header h1 {
font-size: 10rem;
text-align: center;
}

.getstarted-button {
display: flex;
justify-content: center;
align-items: center;
align-content: flex-start;
padding-right: 500px;
font-weight: bold;
font-size: 1.5rem;

}

.top-section-header {
display: flex;
justify-content: space-around;
align-content: column;
margin: 4rem;
padding-top: 45px;
border-top: 2px solid black;
font-size: 2rem;
}

.top-section {
display: flex;
justify-content: center;
align-content: column;
/* margin: 24px; */
margin-right: 12px;
font-size: 1.8rem;
line-height: 1.25;
}

.middle-img {
display: flex;
justify-content: space-around;
align-content: column;
margin: 0 auto;
padding: 2% 0%;
Copy link

Choose a reason for hiding this comment

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

Try to avoid using percentages for vertical (top & bottom) padding or margins because screen size is generally dictated by its width

}


.bottom-section-header {
display: flex;
justify-content: space-evenly;
align-content: column;
margin: 4rem;
margin-right: 12px;
font-size: 2rem;
}

.bottom-section {
display: flex;
justify-content: center;
align-content: column;
margin: 4rem;
border-bottom: 2px solid black;
padding-bottom: 16px;
font-size: 1.8rem;
line-height: 1.25;

}


.contact-header {
display: flex;
justify-content: center;
align-content: flex-start;
padding-top: 12px;
margin: 4rem;
padding-right: 750px;
Copy link

Choose a reason for hiding this comment

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

On the converse, try to use percentages for left-right padding/margins so that they scale with screen size :)

font-size: 1.8rem;
line-height: 1.25;
}

.contact {
display: flex;
justify-content: center;
align-content: flex-start;
padding-top: 16px;
margin: 24px;
padding-right: 675px;
font-size: 1.8rem;
line-height: 1.25;
}

.footer {
display: flex;
Copy link

Choose a reason for hiding this comment

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

It's a technical necessity and in this case it's a small difference, but I encourage you to try to use consistent spacing to make your code easier for you and others to read.

justify-content: center;
align-content: center;
padding-top: 16px;
font-size: 1.8rem;
line-height: 1.25;
}

/* Tablet Specs */

@media (max-width: 800px) {
.idea-img {
display: flex;
justify-content: center;
}

.navigation {
display: flex;
justify-content: center;
flex-direction: row;
margin: 32px;
}

.circle-img {
display: none;
}

.innovation-header {
display: flex;
justify-content: center;
flex-direction: column;
}

.middle-img {
display: flex;
justify-content: space-around;
align-content: column;
margin: 0 auto;
max-width: 100%;
}

.getstarted-button {
display: flex;
justify-content: flex-end;
padding-right: 370px;
}


/* Mobile Specs */

@media (max-width: 500px) {
Copy link

Choose a reason for hiding this comment

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

Nice work on both your breakpoints!

.idea-img {
display: flex;
justify-content: center;
}

.navigation {
display: flex;
justify-content: center;
flex-direction: column;
margin: 32px;
}

.top-section-header {
display: flex;
flex-direction: column;
justify-content: space-around;
align-content: column;
margin: 4rem;
padding-top: 45px;
border-top: 2px solid black;
font-size: 2rem;
}

.top-section {
display: flex;
flex-direction: column;
justify-content: center;
align-content: column;
/* margin: 24px; */
margin-right: 12px;
font-size: 1.8rem;
line-height: 1.25;
}

.bottom-section-header {
display: flex;
flex-direction: column;
justify-content: space-around;
align-content: column;
margin: 4rem;
padding-top: 45px;
border-top: 2px solid black;
font-size: 2rem;
}

.bottom-section {
display: flex;
flex-direction: column;
justify-content: center;
align-content: column;
/* margin: 24px; */
margin-right: 12px;
font-size: 1.8rem;
line-height: 1.25;
}
}


82 changes: 81 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,86 @@
</head>

<body>
<!-- Use your own code or past solution here! -->
<nav class="navigation">
<a href="#">Services</a>
<a href="#">Product</a>
<a href="#">Vision</a>
<a href="#">Features</a>
<a href="#">About</a>
<a href="#">Contact</a>
<img class="idea-img" src="img/logo.png" alt="Great Idea! Company logo.">
</nav>

<header class="header">
<h1 class="innovation-header">Innovation</br>On</br>Demand</h1>

<img class="circle-img" src="img/header-img.png" alt="Image of a code snippet.">

</header>

<p class="getstarted-button">Get Started</p>

<section class="top-section-header">
<h2 class="features-main">Features</h2>
<h2 class="about-main">About</h2>
</section>

<section class="top-section">

<p class="features-text">Aliquam elementum magna eros, ac posuere elvit tempus et.</br>
Suspendisse vel tempus odio, in interdutm nisi.</br> Suspendisse eu ornare nisl.
Nullam convallis augue justo,</br> at imperdiet metus scelerisque quis.</p>

<p class="about-text">Aliquam elementum magna eros, ac posuere elvit tempus et.</br>
Suspendisse vel tempus odio, in interdutm nisi.</br> Suspendisse eu ornare nisl.</br>
Nullam convallis augue justo,</br> at imperdiet metus scelerisque quis.</p>


</section>


<img class="middle-img" src="img/mid-page-accent.jpg" alt="Image of code snippets across the screen">


<section class="bottom-section-header">
<h2 class="services-main">Services</h2>
<h2 class="product-main">Product</h2>
<h2 class="vision-main">Vision</h2>
</section>

<section class="bottom-section">
<!-- <h2 class="services-main">Services</h2> -->
<p class="services-text">Aliquam elementum magna eros,</br> ac posuere elvit tempus et.</br>
Suspendisse vel tempus odio,</br> in interdutm nisi. Suspendisse eu ornare nisl.</br>
Nullam convallis augue justo,</br> at imperdiet metus scelerisque quis.</p>

<!-- <h2 class="product-main">Product</h2> -->
<p class="product-text">Aliquam elementum magna eros, ac</br> posuere elvit tempus et.</br>
Suspendisse vel tempus odio,</br> in interdutm nisi.</br> Suspendisse eu ornare nisl.</br>
Nullam convallis augue justo,</br> at imperdiet metus scelerisque quis.</p>

<!-- <h2 class="vision-main">Vision</h2> -->
<p class="vision-text">Aliquam elementum magna eros, ac</br>posuere elvit tempus et.</br>
Suspendisse ve</br>l tempus odio, in interdutm nisi.</br>Suspendisse eu ornare nisl.</br>
Nullam convallis augue justo, </br>at imperdiet metus scelerisque quis.</p>
</section>

<section>
<h2 class="contact-header">Contact</h2>
<address class="contact">
123 Way 456 Street</br>
Somewhere, USA</br>
</br>
1 (888) 888-8888</br>
</br>
[email protected]
</address>
</section>

<footer class="footer">
<p>Copyright Great Idea! 2018</p>
</footer>

</body>

</html>