Make Money Online BUILDING WEBSITES Responsive Website Design using Html CSS & Javascript | Step By Step Web Design

Responsive Website Design using Html CSS & Javascript | Step By Step Web Design

Responsive Website Design using Html CSS & Javascript |  Step By Step Web Design post thumbnail image


Responsive website design has become a must-have feature for all websites. In this article, we will show you how to create a responsive website using HTML, CSS, and JavaScript.

We will start by creating the HTML for our website. The HTML will consist of a header, main content area, and footer. We will also add a few divs for our CSS to style.

Responsive Website

Step By Step Web Design

Copyright © 2017

Next, we will add some basic CSS to style our website. We will set the width and height of our container, and add some basic styling to our header and footer.

.container {

width: 960px;

height: auto;

}

.header {

background-color: #fff;

height: 100px;

padding: 10px;

text-align: center;

}

.footer {

background-color: #fff;

height: 50px;

padding: 10px;

text-align: center;

}

Now, we will add some responsive styling to our website. We will use the max-width property to make our website responsive.

.container {

width: 960px;

max-width: 100%;

height: auto;

}

.header {

background-color: #fff;

height: 100px;

padding: 10px;

text-align: center;

}

.footer {

background-color: #fff;

height: 50px;

padding: 10px;

text-align: center;

}

Now, we will add some JavaScript to our website. We will use the window.matchMedia() function to detect when the screen size changes. We will then use the CSS Media Queries to change the styling

Related Post