So by the end of this video you will have a firm grasp on how to create responsive layouts and write all of the code necessary Web Design Company In Denver so let’s dive right in so this is the HTML that makes up the web page that we’ve been looking at in the browser.
It’s a very simple page now a word of caution if you’re not familiar with the basics of CSS or what CSS is I recommend watching some of my earlier videos on CSS because all responsive web design is is essentially conditional CSS we want to send the web browser different sets of CSS depending on the size of the viewport so for example once the browser is smaller than say pixels.
we simply want to send it different CSS instructions so let’s write our first line of code in the head section of our website we want to include a different style sheet at the appropriate time we will name this new file responsive CSS and oops media equals screen and we’ll give it a max width of pixels so let’s go ahead and create this new file in our CSS folder new file responsive CSS okay and let’s just say color oops color red okay so if i refresh the page.
I make the window smaller than pixels we can see that now all the text is written now obviously that’s not what we want to do is just a proof of concept so let’s go back to our code okay so this line is really important we’re just saying if this condition is met think of this almost like an if statement.
If this is met include this file it’s that simple so we’re off to the races #facebbok let’s begin writing code for when the browser reaches a certain size so our first bit of business is to make this top section only two columns instead of three.
When the browser window is smaller than nine hundred pixels so let’s take a look at the code that makes up this current three column layout in the HTML it’s nothing more than divs with a class of see there’s one there’s another one and here’s another one let’s take a look at the CSS we’re saying width of and float them to the left and give them margin right of % now here’s where a little bit of arithmetic comes into play.