From the course: Creating a Responsive Web Design: Advanced Techniques
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Removing the header height restrictions - CSS Tutorial
From the course: Creating a Responsive Web Design: Advanced Techniques
Removing the header height restrictions
- Now we need to set the header area in our html to grow if the mobile menu or any items inside of the header need to get taller than the available space. So to do this we're going to go back to our CSS file. Let's make sure we're in the media query for a max-width of 625. Let's find the header area inside of here, and here we have the height set to 160 pixels. We're going to instead come in here and change the 160 to auto. This will allow the height of the header element to encompass all of it's children. After that we're going to come in here and set a minimum height. So we'll set min-height, and we're going to set that to 160 pixels. This way, when the mobile menu is in a hidden state, the height of the header will still be 160 pixels, so we can see the banner background graphic but we're not going to limit the height if the mobile menu is activated. And now, with these changes for screens under 625, let's scroll down and let's find the media query for screens that are a maximum…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
About this lesson46s
-
(Locked)
Relocating the nav element4m 33s
-
(Locked)
Adding a mobile link button4m 43s
-
(Locked)
Removing the header height restrictions2m 2s
-
Restyling the mobile menu2m 22s
-
(Locked)
Adjusting the logo to overlap the menu3m 58s
-
(Locked)
Adding JavaScript and jQuery to your project5m 32s
-
(Locked)
Attaching a click event to the mobile menu button4m 4s
-
(Locked)
Animating the height of the navigation4m 51s
-
(Locked)
Removing the style attribute from the nav element5m 21s
-
(Locked)
Where to go from here25s
-
(Locked)
-
-