Skip to content

some changes done#2

Closed
than2042 wants to merge 9 commits into
CodeYourFuture:masterfrom
than2042:flexbox/karma/than
Closed

some changes done#2
than2042 wants to merge 9 commits into
CodeYourFuture:masterfrom
than2042:flexbox/karma/than

Conversation

@than2042
Copy link
Copy Markdown

@than2042 than2042 commented Apr 4, 2018

Please drop comment!

@than2042
Copy link
Copy Markdown
Author

than2042 commented Apr 4, 2018

Hi Lucy,
I hope that Ok with homework as I am a bit confused.
Thank you!

Comment thread index.html
<li>Login</li>
</ul>
<img class="logo" src="img/karma-logo.svg" width="26">
</div>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if the logo appears first, from left-to-right, then it should (in most cases) appear first in your HTML.
Try moving it before the <ul> and you won't need the negative margin anymore: https://github.com/CodeYourFuture/karma-clone/pull/2/files#diff-6a6a912d0c7b55b537768da778032849R44

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also, try adding display: flex; to the .content div and position the logo and nav links using flexbox 😉

Comment thread index.html
</section>
<section class="cases">
<div class="content">
<h2>Everyone needs a little Karma.</h2>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Again, try adding display: flex to the .content container and position the list items that way.
To avoid the devices spreading too wide, contain them with a max-width

Comment thread css/style.css
border: 1px solid #eaebec;
padding: 0.625rem 0;
text-align: center;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

To make your circles perfectly round, you need 2 things:

  • the border-radius at 100%
  • equal padding all around the inside (currently only top and bottom)

Comment thread index.html
@@ -8,9 +8,80 @@
<link rel="stylesheet" href="css/normalize.css">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Add this line in your <head>:
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
It will ensure that the page is scaled on a mobile. At the moment, everything is tiny 🔍

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

With this, and the use of flexbox on your .content, as suggested, you will find it much easier to position your content on mobile 👍

@LucyMac LucyMac added the reviewed A mentor has reviewed this PR label Apr 5, 2018
@than2042 than2042 closed this Apr 5, 2018
@than2042 than2042 reopened this Apr 5, 2018
@than2042
Copy link
Copy Markdown
Author

than2042 commented Apr 5, 2018

Hi Lucy,
Thank you very much for your advices, I made a few changes. Please let me know if there anything I have to improve.

Comment thread css/style.css
.intro {
height: auto;
width: auto;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The height of this section as initially almost 46rem and is now set to auto. Auto means it will only be as big as the content. There isn't much content (headline + button) so the hero is suddenly very small! You can fix this by adding padding to .intro, it will make it grow.

https://github.com/CodeYourFuture/karma-clone/pull/2/files#diff-6a6a912d0c7b55b537768da778032849R54

Comment thread css/style.css
padding: 0 0.938rem;
margin: 0 auto;
min-width: 37.5rem;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is too much for mobile, change it in your media query. If you want it to adapt to the size of the device you can say min-width: 100%

Tip: min-width has more specificity than width so min-width (and max-width) will always override width.

Comment thread css/style.css
width: 33.3333333%;
float: left;
display: flex;
justify-content: space-around;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

float: left has no effect if you are using Flexbox. Either you use floats, or you use flexbox. For this exercise, stick to flexbox 🙂
Once you get used to it, Flexbox is much easier to control and gives you more flexibility for positioning.

Comment thread css/style.css
display: flex;
flex-direction: column;
align-items: flex-start;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

would you not want to center the column?

Comment thread css/style.css
}
.cases .content {
margin-top: 5rem;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a very big margin for a small screen.

Comment thread css/style.css Outdated
border-radius: 100%;
width: 1.5rem;
height: 1.5rem;
display: inline-block;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

only display: flex please!
You will see it will be much easier to center the icons inside the bubbles with flexbox

Comment thread css/style.css
}
.navigation .links {
display: flex
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

on mobile the navigation doesn't fit on the screen. Try to think of a way to fix this (make it smaller? tighter? or disappear completely?)

Copy link
Copy Markdown
Collaborator

@LucyMac LucyMac left a comment

Choose a reason for hiding this comment

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

It's better Than Than, but the size of elements on mobile still needs adjusting. The 3 cases blocks are better centered but they are too small. Let them grow and use up the space.
Also the padding at the bottom of the page is too large on mobile.
The problem is you only have 1 mobile breakpoint (600px) when you probably need a couple more to fine-tune everything.
A few adjustments, but otherwise much better.

Comment thread index.html
</div>
</nav>
<section class="intro">
<div class="intro">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Watch out, you have 2 instances of the .intro class so the background image is appearing twice.

@LucyMac LucyMac added the London class 4 start March 2018 label Mar 12, 2019
@LucyMac LucyMac closed this Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

London class 4 start March 2018 reviewed A mentor has reviewed this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants