girlcodeakl / girlcode2018-term2

Girl Code project
0 stars 0 forks source link

Make the form look good on phones #17

Closed mgatland closed 6 years ago

mgatland commented 6 years ago

Our post.html page looks really bad. Let's improve it!

You don't need to get it perfect – we will probably change it again later.

You will be working in post.html and style.css

Right now, our form probably looks like this:

screen shot 2017-05-15 at 9 05 31 pm

This layout isn't very good. It's especially bad on phones, which need bigger inputs.

Here is a great modern-looking form from trademe.co.nz:

screen shot 2017-05-15 at 9 09 37 pm

Make our form look a bit more like the TradeMe one by making some of these changes:

Try adding this code to style.css as a starting point.

input {
    border: 1px solid orange;
    background-color: green;
    color: red;
}

button {
   color: blue;
   background-color: green;
   border: 1px solid red;
}

Does your form look nice and spacious, like the TradeMe example?

How does it look on a phone?

To test how your site looks on a small screen, open the Developer Tools then click this button near the top left:

screen shot 2017-05-15 at 9 17 26 pm

Now you get some options (above the web page) to choose what kind of phone you want to emulate. You can even rotate the screen!

screen shot 2017-05-15 at 9 17 41 pm

You sometimes need to refresh the page each time you change the kind of phone, to make everything resize correctly.

The site might look super small. We need to add this line to the head of our page to make it work properly on phones:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

buttons

Want to customise the buttons a little bit? Here are some great examples to try.

https://www.w3schools.com/css/css3_buttons.asp