back to all posts

Build Mobile-First Website using CSS Grid -2

by Nabendu Biswas / August 3rd, 2020

#css #grid #html
Series: Mobile-grid

Welcome to part-2 of the series.

We will first add the basic css to our style.css, which is necessary for the primary color, reset and the body.

style.cssstyle.css

So, our site will look like below. Notice that we are creating the mobile layout first.

Mobile LayoutMobile Layout

Next, we will create the style for the button and the button hover. We are also creating the style for the input and the textarea.

buttonbutton

Now, our mobile site looks like below.

Button doneButton done

Next, we will have added the Rubik font from google font, through an import. We are also adding it in the font-family of the body.

font-familyfont-family

So, our font have changes and our mobile site looks like below.

Mobile siteMobile site

Lastly we will create our site with alternative color scheme. Notice that we are using rem for our calculation.

color schemecolor scheme

Now our mobile site looks like below.

Mobile siteMobile site

This completes part-2 of the series. See you soon.

You can find the code for the same in this github link.

Nabendu Biswas