How to code a brewery website - The Intro Section [Design & Code] Code part 3
Skills:
HTML & CSS80%
Key Takeaways
This video tutorial by Kevin Powell demonstrates how to code the intro section of a brewery website using HTML, CSS, and SASS, covering topics such as background images, grid layout, and responsive design.
Full Transcript
hi and welcome back to this series we're building out the website for a brewery you haven't yet watched the other videos in this series I strongly recommend that you do so you know how we got to where we are now and in this one we're gonna be building out the intro section to the site so the part just with the local brewery in the little text there with the background image we're going to explore some fun little sass things but nothing too complicated just some nice features that are in sass that you can use and it's gave me a pretty simple and pretty fast video so let's jump right into it now I'm gonna just going to let's go back to my file structure here and I'm gonna go into my layout and when I'm pretty much gonna do often I would have this Rattray page but because I'm not having several pages and having lots of different sections the home page usually has some custom layout stuff in this case I'm just gonna do like each section will get its own file in my layout so the first thing to underscore intro s CSS and don't forget to import it so add import layout slash intro save that close my main for now close all these I haven't made a mixin yet I still think we'll have B we'll probably have one mix in for this I'm thinking I don't really need my assets open so we new dodge intro in my dot intro I didn't do my nav we'll come back and do my nav in my intro we're gonna have my let's just I'm just trying to think um okay we'll do background-image:url dot dot images slash add just really important here when you do this if it's doing like now if I do back it's going back right because we're inside of we're inside of this so I'm going back a step I'm in my S CSS folder but in reality once this is compiled I'm going out of here so what do they call it even hero BG 0 bgj big background actually show you a nice little trick you can do you can nest inside of sass so background and then I do like this and then here I can do size that size URL a background image and then my usual URL and background size cover even if it's like Rapide no-repeat so if I do all that and I hit saved all of this is nested inside the background so if I come in I'll actually look at my main thing here when I scroll all the way down it's doing background image background size background repeat' and all of that fun stuff so a nice little trick with sass that you can do to save some keystrokes along the way let's go see how this is all looking we don't see anything and of course it's still not working because this should be images there we go awesome obviously my logo is kind of crazy so let's just for the moment with of I don't know 250 pixels margin:0 auto and bottom to em and my auto margin left and right won't work just display:block cool actually I don't even know if I need that because on here what I'm gonna do is I'm going to do a whoops display grid because what I want to do I'm just gonna do up here on here margin of 0 make my life a little easier oops wrong place okay padding of like ten viewport height zero okay for my grit what I'm gonna do is grid Auto flow so that's for my [Music] columns enter my rows and if you're not too familiar with grid I do have several videos where I sort of explore it so you can check out my series on that Auto flow and then I'm just trying to think for my width here what I want to do what do i do what do I want to do what do I want to do Auto flow and I'm gonna do like a min max min max I mean max but they're all gonna be well they're not all different the middle one will be different minimum will be one em come on 1fr I guess yep and we'll do the same thing here one M comma one fr and in my middle will say like 400 pixels I'm trying to think how wide my design gets this is have a width width well my width is pretty narrow that I did on that sole say 650 650 pixels so if I did that properly I clearly did not I actually might have still anyway that means that this has a width of between 450 and 650 and then my two sides will grow and shrink in accordance but they will never get smaller and then one M as I'm growing and shrinking stuff so it's working actually really well the only problem is obviously this is here now instead of being on top and it's because this is actually falling into the first column here and then the rest of it is in the middle column like I'd want it to so I'm just gonna say dot logo so this is my logo that's inside my section intro and this logo will get a grid column two over three and my this doesn't really have to be in your intro text the same thing there we go super so that is good and now I have like a little line that's right here so I'm just going to do that as like a before element on here so on my intro text what I can do is nested inside of there ampersand and then after and what that gets compiled down to would be taking this copy and pasting that there so it's just a lot easier than having to write the whole thing up by nesting it like that and using the ampersand so content it's a before so I need some content I need a display:block height will do one pixel background can be void opacity can be like 0.3 width will start with 100 pixels and play from there it's there so let's do position top position:absolute aiming which means this one position relative save top zero top one M mmm where did he go oh it's there top negative one em my bad cool margin 0.25 M Otto oh I have it is display up so position:absolute so this won't do anything we can do the whole left 50% transform translate X negative 50% trick cool cool cool that worked and this I can just give this a little margin error will do get my logo margin bottom margin bottom hmm interesting we'll go up to 3 and we'll stick with a 2.5 and we'll be happy with that cool so I'm happy with that that's going to grow and shrink and be nice and dandy super duper um two things left let's just come back up to my section intro here text-align:center and the color is going to be color brown light question mark yeah I think that's what I did our base maybe even I think I made it a little darker that's easy enough to read I think cool so that is looking nice and dandy alright so and yeah that's it for this video I hope you've liked it we're gonna do in the next video is just keep this going my next one is actually in me by the time you get to it the navigation will be done we won't even worry about that because it's really so basic and simple if you really want to check it out you can always go over to the github repo and check and the next video Juli give me a focus on this one and then we're gonna wrap everything up so thank you so much before watching you guys are amazing I love all the support I've been getting from you guys lately it's been incredible so thank you very much and a big THANK YOU my patrons who are supporting me financially so you guys are absolutely amazing if you'd be curious or want to know more about that you can go and check out my patron there's links to that in the description below and on the side there probably and of course until next time don't forget to make your corner the internet just a little bit more awesome
Original Description
It's time for the intro section of the brewery website!
Github starting point: https://github.com/kevin-powell/brewery-start
Github for this project: https://github.com/kevin-powell/brewery_website
#designandcode #sass #scss
---
I have a newsletter! https://www.kevinpowell.co/newsletter
New to Sass, or want to step up your game with it? I've got a course just for you: https://www.kevinpowell.co/learn-sass
---
My Code Editor: VS Code - https://code.visualstudio.com/
How my browser refreshes when I save: https://youtu.be/h24noHYsuGc
---
Support me on Patreon: https://www.patreon.com/kevinpowell
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.
Instagram: https://www.instagram.com/kevinpowell.co/
Twitter: https://twitter.com/KevinJPowell
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Kevin Powell · Kevin Powell · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
How to create an awesome navigation bar with HTML & CSS
Kevin Powell
Improve your CSS by Keepin' it DRY
Kevin Powell
HTML & CSS for Beginners Part 6: Images
Kevin Powell
HTML & CSS for Beginners Part 7: File Structure
Kevin Powell
HTML & CSS for Beginners Part 4: Bold and Italic text and HTML comments
Kevin Powell
HTML & CSS for Beginners Part 5: Links
Kevin Powell
HTML & CSS for Beginners Part 3: Paragraphs and Headings
Kevin Powell
HTML and CSS for Beginners Part 1: Introduction to HTML
Kevin Powell
HTML and CSS for Beginners Part 2: Building your first web page!
Kevin Powell
HTML & CSS for Beginner Part 8: Introduction to CSS
Kevin Powell
HTML & CSS for Beginners Part 9: External CSS
Kevin Powell
HTML & CSS for Beginners Part 10: Divs & Spans
Kevin Powell
HTML & CSS for Beginners Part 11: Classes & IDs
Kevin Powell
HTML & CSS for Beginners Part 12: The CSS Box Model - Margin, Borders & Padding explained
Kevin Powell
HTML & CSS for Beginners Part 13: Background Images
Kevin Powell
HTML & CSS for Beginners Part 14: Style Text with CSS
Kevin Powell
HTML & CSS for Beginners Part 15: How to style links
Kevin Powell
HTML & CSS for Beginners Part 16: CSS selectors and Specificity
Kevin Powell
HTML & CSS for Beginners Part 17: How to Create and Style HTML Lists
Kevin Powell
HTML & CSS for Beginners Part 18: How Floats and Clears work
Kevin Powell
HTML & CSS for Beginners Part 19: Colors with CSS - hex, rgba, and hsla
Kevin Powell
HTML & CSS for Beginners Part 20: How to center a div
Kevin Powell
HTML & CSS for Beginners Part 21: How to create a basic website layout - the HTML
Kevin Powell
HTML & CSS for Beginners Part 22: How to create a basic layout - the CSS
Kevin Powell
How to Create a Responsive Website from Scratch - Part 1: The HTML #Responsive #HTML5
Kevin Powell
How to Create a Responsive Website from Scratch - Part 2: The Header and Hero area #Responsive #CSS3
Kevin Powell
How to Create a Responsive Website from Scratch - Part 3: The About Section #Responsive #CSS
Kevin Powell
How to Create a Responsive Website from Scratch - Part 4: Building a Responsive Portfolio Section
Kevin Powell
How to Create a Responsive Website from Scratch - Part 5: Call To Action and Footer #CSS #Responsive
Kevin Powell
Tutorial: Learn how to use CSS Media Queries in less than 5 minutes
Kevin Powell
End of the year upate and what's coming to my channel to start the new year
Kevin Powell
Create a CSS only Mega Dropdown Menu
Kevin Powell
CSS Tutorial: Outline and Outline Offset
Kevin Powell
CSS Blending Modes
Kevin Powell
Parallax effect | 2 different ways to add it with jQuery
Kevin Powell
CSS Units: vh, vw, vmin, vmax #css #responsive #design
Kevin Powell
How to Create a Website - Complete workflow | Part 01: Intro + Setting things up
Kevin Powell
100 Subscribers speed coding bonus video
Kevin Powell
How to Create a Website - Complete workflow | Part 02: The Markup #HTML
Kevin Powell
How to Create a Website - Complete workflow | Part 03: Sass Variables and a Mixin #Sass
Kevin Powell
How to Create a Website - Complete workflow | Part 04: Setting up the hero and header
Kevin Powell
How to Create a Website - Complete workflow | Part 05: Typography & Buttons
Kevin Powell
How to Create a Website - Complete workflow | Part 06.1: Building the navigation with Flexbox
Kevin Powell
How to Create a Website - Complete workflow | Part 06.2: Making the nav work with jQuery
Kevin Powell
Redesigning & Coding My Website #CreateICG
Kevin Powell
How to Create a Website - Complete workflow | Part 07: Starting the flexbox grid
Kevin Powell
How to Create a Website - Complete workflow | Part 08: Promo & Problem shooting!
Kevin Powell
How to Create a Website - Complete workflow | Part 09: The CTA and Footer
Kevin Powell
How to Create a Website - Complete workflow | Part 10: Making it responsive
Kevin Powell
How to Create a Website - Complete workflow | Part 11: Making it responsive con't
Kevin Powell
How to Create a Website - Complete workflow | Part 12: Putting the site online
Kevin Powell
Create a Custom Grid System with CSS Calc() and Sass
Kevin Powell
CSS em and rem explained #CSS #responsive
Kevin Powell
Should you use Bootstrap?
Kevin Powell
How to add Smooth Scrolling to your one page website with jQuery
Kevin Powell
Let's learn Bootstrap 4
Kevin Powell
How I approach designing a website - my thought process
Kevin Powell
Build a website with Bootstrap 4 - Part 1: The setup
Kevin Powell
Build a website with Bootstrap 4 - Introduction
Kevin Powell
Build a website with Bootstrap 4 - Part 2: Customizing Variables
Kevin Powell
More on: HTML & CSS
View skill →Related Reads
🎓
Tutor Explanation
DeepCamp AI