Skip to content

First responsive website#28

Open
michelletamar wants to merge 2 commits into
Technigo:masterfrom
michelletamar:master
Open

First responsive website#28
michelletamar wants to merge 2 commits into
Technigo:masterfrom
michelletamar:master

Conversation

@michelletamar
Copy link
Copy Markdown

Hello!

As mentioned in the readme, this is my first attempt at a responsive website. I only had time to create the homepage and not any subpages.

There are a few mistakes which I'm already aware of but unfortunately I didn't have time to fix them:

  • Horizontal scroll on mobile
  • Started with desktop first instead of mobile first
  • I tried hard to follow DRY but I think I might have repeated myself
  • The hamburger menu on mobile does not actually do anything.
  • The margins for each section are kind of all over the place : p

Thank you and I look forward to your feedback :)

I created a responsive website, but still had issues with the horizontal scroll. It was also confusing to know the breakpoints for the media queries, since on Chrome Inspect tool the px are different from what is said in the Technigo videos, so I wasn't sure - apologies.
Copy link
Copy Markdown

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

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

Hi! Great job with this page - it's so pleasing to look at and the design is very nice and playful. I think you managed well with the responsiveness, I don't see any horizontal scroll. And regarding the DRY - it's always hard - no matter how long you've been coding. Just the fact that you're thinking about it is super. It will get easier once you practice how to structure your file and such. Keep up the good work!

Comment thread code/index.html
<main class="main-container">

<section class="hero-container">
<h1>We <em>humanise</em> brands.<br> We <em>connect</em> them to culture. <br> We make content that <em>converts</em>.</h1>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I really like this effect! Just know that <br> is not being used anymore and that you could achieve line breaks with flexbox :)

Comment thread code/index.html

<section class="work-container">
<h2>Our Work</h2>
<section class="image-gallery">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice image grid!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would be nice to keep all images in a folder so that they don't clutter the code folder :)

Comment thread code/index.html
<img class="clientimg" src="pepsi.png" alt="Pepsi">
</section>
<section class="clients-container-button">
<a class="button" href="./services.html"> OUR SERVICES </a>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

For "fake" links you could use "#" as the href

Comment thread code/style.css
Comment on lines 13 to +17
body {
background-color: peachpuff;
background-color: #f3bbff;
animation: bgColor 50s infinite linear;
margin: 0px;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I really enjoy this background animation 😍

Comment thread code/index.html
<div></div>
</div>
<div class="header-left">
<a href="./index.html"> <img src="logo.png" alt="Logo Fake Agency"></a>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Oh no, I wanted to know what font this was 😆

Comment thread code/style.css
Comment on lines +76 to +109
@media screen and (max-width: 667px) {
h2 {
font-size: 50px;
}
}

@media screen and (min-width: 1024px) {
h2 {
font-size: 80px;
}
}

h3 {
font-family: 'EB Garamond', serif;
font-size: 30px;
}

h4 {
font-family: 'Fira Sans', sans-serif;
font-size: 40px;
font-weight: 200;
}

@media screen and (min-width: 1024px) {
h4 {
font-size: 60px;
}
}

@media screen and (max-width: 667px) {
h4 {
font-size: 25px;
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You wrote that you struggled with the DRY principle so maybe you're already aware of this - but a good rule of thumb is to keep the media queries in order. If you're styling desktop first, then you can style desktop first, then tablet, and lastly mobile (or the other way around). Also, you can have many rules for many elements inside one media query. Something like this:

/*Default (desktop in your case)*/
h1 {
  /*styling for default*/
}

h2 {
  /*styling for default*/
}

h3 {
  /*styling for default*/
}

h4 {
  /*styling for default*/
}

/*Tablet*/
@media screen and (max-width: 667px) {
  h1 {
    /*styling for tablet*/
  }

  h2 {
    /*styling for tablet*/
  }

  h3 {
    /*styling for tablet*/
  }

  h4 {
    /*styling for tablet*/
  }
}

and so on

Comment thread code/style.css
font-size: 30px;
border: 2px solid black;
border-radius: 30px;
padding: 10px;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Try padding: 10px 30px; to get some more padding on the sides (can be needed - especially when you have a bit of border-radius)

Comment thread code/style.css
Comment on lines +365 to +377
.container:hover .overlay {
opacity: 1;
border-radius: 20px;
}

.text {
color: white;
font-size: 50px;
position: relative;
justify-items: center;
top: 30%;
font-family: 'EB Garamond', serif;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants