How to turn things on and off for mobile tablet & desktop responsive websites

This lesson is exclusive to members

Course contents
SECTION: 4
Project 2: Bike Repair Website 6:12:48
SECTION: 6
Project 4: Bootstrap Yogurt Website 3:35:39

Questions

You need to be a member to view comments.

Join today. Cancel any time.

Sign Up

Course info

128 lessons / 17 hours 5 projects Certificate of achievement

Overview

Hi there, my name is Daniel Scott and together we’re going to learn how to build professional responsive websites. which look good on mobiles, tablets and desktop screens.

We will build 4 sites together...
  • a simple but elegant restaurant website.
  • a bike repair website. 
  • a responsive portfolio website.
  • a Bootstrap website.  

We cover everything you need to build your first website. From creating your first page through to uploading your website to the internet. We’ll use the world’s most popular (and free) web design tool called Visual Studio Code.

There are exercise files you can download and then work along with me. At the end of each video I have a downloadable version of where we are in the process so that you can compare your project with mine. This will enable you to see easily where you might have a problem.

We will delve into all the good stuff such as how to create your very own mobile burger menu from scratch learning some basic JavaScript and jQuery. 

 You will...
  • Learn how to work with responsive images and icons. and stunning full screen background images and probably one too many gradients. 
  • Learn how to create forms and to choose great fonts for your website. 
  • Learn how to work with Bootstrap 4 to easily add carousels, cards and complex looking menus. 
  • Setup a domain name with hosting so that your website is live on the internet for others to see.  

There are fun class projects for you to work on which will enable you to practice what you learn. By the end of this course you’ll have a great understanding of important web design topics like HTML5, CSS3, Flex box, Responsive design and Bootstrap.   

If that all sounds a little too fancy - don’t worry, this course is aimed at people new to web design and who have never coded before. We’ll start right at the beginning and work our way through step by step. 

Who am I? 

I’m Dan, and I’ve been building websites for about 15 years now. I am award winning instructor, and have won a MAX Master award for the last 2 years in a row at the prestigious Adobe Max conference.

Time to upgrade yourself?
Sign up for the course and let’s learn how to build responsive websites.

Course duration 16 hours 42 mins
Daniel Scott

Daniel Scott

Founder of Bring Your Own Laptop & Chief Instructor

instructor

I discovered the world of design as an art student when I stumbled upon a lab full of green & blue iMac G3’s. My initial curiosity around using the computer to create ‘art’ developed into a full-blown passion, eventually leading me to become a digital designer and founder of Bring Your Own Laptop.

Sharing and teaching are a huge part of who I am. As a certified Adobe instructor, I've had the honor of winning multiple Adobe teaching awards at their annual MAX conference. I see Bring Your Own Laptop as the supportive community I wished for when I was first starting out and intimidated by design. Through teaching, I hope to bring others along for the ride and empower my students to bring their stories, labors of love, and art into the world.
True to my Kiwi roots, I've lived in many places, and currently, I reside in Ireland with my wife and kids.

Certificates

We’re awarding certificates for this course!

Check out the How to earn your certificate video for instructions on how to earn yours and click the available certificate levels below for more information.

Downloads & Exercise files

Download Exercise Files Download Completed Files

Transcript

Hi there, I can tell from your face that you wish this was a video about tuning things on and off depending on, if it was mobile or tablet. You're in luck my friend, on tablet view, we've got box one, two, all the way through to 10, all of them, but on desktop, because we've got three columns across, I only want nine. I want to turn 10 off, and it's gone, look. Then on mobile we want it to, box one, two, three, four, and then I turn the chunk of them off, and just turn 10 back on, just for kicks. 

So this video is going to show you how to turn things on and off using CSS and Media Queries , depending if you're on mobile or tablet, the short version is, basically just apply a special class with display:none. Apply it to the things you want to turn off, and it will turn off, but for the long version, and all the good stuff, hang about, let's jump in and work out how to do it. 

To add it we need to create a Class in our CSS that turns it off, and then apply that Class towards the thing you want to turn off. So the style in our case is, remember, on Desktop view - let's zoom out - is I want nine of them showing, so it's nice and even. I don't want that extra one hanging out which it currently does, there's this guy, don't want you there. These, and then-- so when we get to this view, we can turn our 10 back on, even though I've only got 8 here. 10 will fill it up still nicely, but in our mobile, I want to turn them all back on, because it doesn't really matter how many I have. So let's have a look at doing that. 

We're going to create a Class. We're going to call this one 'Hide Desktop only'. It's a bit long, I wouldn't call it this, I'd probably call it H or Hide D. Just to make it smaller, but we'll try and make it really explicit, so it's really easy to work out in this Class. And all we're going to do is say 'display', we've done Block, we've done Inline Block, we've done Flex, we're going to do None, goodbye. So it's in my kind of global stuff, which means I'm targeting Desktop. If you want to turn it off for tablet, you'd probably change the name of it and have it in here. 

Actually we might do that in this video, just to really kind of explain what we're doing. So now I need to-- because it's really long, I'm just going to copy it, apply it to something, so box 10 here, we're going to add two Classes. So make sure there's a space between the two separate Classes. Make sure it's inside your quotation marks, and hopefully now, on this view here, it's going to turn off. It's gone, on Desktop view, but it's gone on this view as well, tablet and mobile. It's because of that kind of flow. It flows through here, and there's nothing else telling it to come back on. 

So what we have to do is grab all of this, including the curly brace, and make sure, when you are pasting this, we leave that guy there. He needs to be there, the kind of closing of this Media Query, and I paste this in, and I want to turn it, Display to Block, to show it up again. I don't need to tell it for this, because it will flow through on to mobile hopefully. So on Desktop, I've got nine, I can't scroll down any further. On tablet though, here we go, box 10 appeared. Then on mobile it should be there as well. 

Let's just say, on mobile we need to turn a bunch of them off, because it's just, maybe it's scrolling really long, maybe you've got like 50, and on tablet you've got 40, but on mobile you just want 10. Let's just pretend that that's what we want to do. So in VS code we need to create another Class, and I only want to activate it at mobile. So before the last curly brace there, I'm going to say, I want one called 'Hide mobile only'. I'm not sure why I put mobile only, just call that, seems simpler. Same thing, display:none. And because it's linked into this CSS it's only to what you apply it to, but it's going to take effect, kind of make sense? 

So what am I going to do? I'm going to do some multiple cursors, which is 'Command Option' on my Mac, or 'Control Option’ on a PC'. You’re sick of me telling shortcuts, aren't you? Space, and I'm going to call this, well I'm not going to call it, I'm going to grab 'Hide mobile', hopefully all of these are going to turn off. 10's not, it's going to be there, because I left that off this little group. Let's have a look. So, Desktop view, I've got nine. Teleview, I've got all 10, and then on mobile I've got, we've got one, two, three, four, and ten. All right, we're making responsive stuff. It's not very pretty but we know how to add text and images. 

We're going to do it for this site, because responsive images are quite important, we'll get on to that next, but I hope you're getting used to using Media queries, both to do text changes but also to do things like structural changes, and turn things on and off. Now we've just done simple things like turning boxes on and off. You could completely change your website for mobile. It might be important that, when people are searching for your site, like I do it for my New Zealand business, it's more of like a sit down classroom business, right? So people come do Adobe courses or Web Design courses, but actually physically turn up. 

So what we do is, when they're viewing it on desktop we show them information, because we know that likelihood is, they're looking to buy a course, we give them information about that, but when they're on the mobile, we've changed the Home Page to be very clear, our address and phone number, because that's more useful for somebody on their mobile, when they're normally rushing to try and, they're late for the class or they can't find the building. So you could turn on a huge-- you can turn Divs completely on and off, that have a nice cool map in it, or directions, or make the phone number really clear on the Home Page. It's not really useful on the Desktop view but be really cool to have on mobile. 

All right, you get the idea. We're turning things on and off using display:none, that one. All right, I'll see you in the next video.
  • Powered by Marvin
  • Terms of use
  • Privacy policy
  • © Bring your Own Laptop Ltd 2024