Building Google homepage - HELP!

Hi everyone!

I’m nearly finished with completing the Google homepage, but I’m encountering a problem.

The footer colour and link colour doesn’t change when I amend this. Have I done something wrong?
Here is the code:

https://codepen.io/mio-chung/pen/QWLBbWx

I’m also trying to add a search icon in the form field using FontAwesome.

Their code is <i class="fas fa-search"></i> I’ve tried to enter this code in after the form but nothing appears…

<!-- SEARCH FORM -->

<div class="form">
  <form>
    <input type="text" id="form-search" placeholder="">
  </form>
</div>

give your footer a height or padding and background should show, also i dont see a cdn for font awesome?

I’ve just added the FontAwesome code in HTMl, it still doesn’t display the search icon.

you need the cdn for it to work

<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">

put it in the head tag

Thank you! I’ll try this.

The footer padding worked : ) however I still can’t change the link colour.

Ah the CDN, right! The search icon has appeared! But it seems to stick on either before or after the form, not inside the form box itself.

to change color of link

footer ul li a {
  color: yourColor;
}

Where did you find the CDN for Fontawesome? I couldn’t find it on their website.

yeah they use different system now i got that from one of my old projects but you will find the cdn on w3schools or cdnjs.com
https://cdnjs.com/libraries/font-awesome

1 Like

This is really helpful, thank you!

I’ve managed to change the font colour which is awesome.

For some reason the footer links are now not in a line like the top nav bar. I’ve applied the inline block so that I can place the elements together but it’s at the bottom of each other.

The search icon has appeared! But it seems to stick on either before or after the form, not inside the form box itself.

this might help you out https://www.geeksforgeeks.org/css-to-put-icon-inside-an-input-element-in-a-form/

and for your links the a should be on a separate one like this

footer ul li {
  display: inline-block;
  font-size: 15px;
  padding-right: 60px;
}
footer ul li a{
  color:black;
}

Thank you!

The footer background color is leaving a gap of colour at the bottom, do you know why this is occuring?
Also the page is not fitting in the browser, the width of the page is longer than the browser, so a scrolling bar appears. How do I ensure the code just fits onto the size of the browser?

if you add padding:50px; it will add padding to the sides too this is why you had a scrollbar so use padding: 50px 0; instead and to move the footer to the bottom use

position:absolute;
bottom:0;

here is example

footer {
  background: #EFEEEE;
  border-top: solid 2px #EFEEEE;
  padding:20px 0;
  position:absolute;
  bottom: 0px;
  width: 100%;
}

This is looking much better! I’ve tried to amend the border top and padding to reduce the footer background smaller, it looks a little big. But this is a the smallest I can amend. How would you go around this?

The search icon has appeared! But it seems to stick on either before or after the form, not inside the form box itself.

I used the margin to change the footer background size!

https://codepen.io/mio-chung/pen/QWLBbWx

I’ve styled a little more and looks quite similar to the homepage of Google!

What do you think?

I’m not sure why there’s a slight darker grey on the search form? Do you know how to get rid of this?