CSS website layout in 9 minutes! 🗺️

preview_player
Показать описание
#CSS #course #tutorial

CSS website layout header nav main aside section article footer tutorial example explained
Рекомендации по теме
Комментарии
Автор

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bro Code</title>
<link rel="stylesheet" href="style.css">
<body>

<header>
<h1>Header</h1>
</header>

<nav class="navbar">
</nav>

<main>
<aside>
<h2>This is Aside</h2>
<p>This is side content</p>
<ul>
<li>author information</li>
<li>fun facts</li>
<li>quotes</li>
<li>external links</li>
<li>comments</li>
<li>related content</li>
</ul>
</aside>

<section>
<h2>This is a Section</h2>
<p>This is dependent content</p>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Dolorum est totam ducimus fugiat possimus consectetur architecto repudiandae, recusandae iusto aperiam eveniet quidem enim aliquam rem. Dolore voluptates nesciunt fuga quisquam?</p>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Dolorum est totam ducimus fugiat possimus consectetur architecto repudiandae, recusandae iusto aperiam eveniet quidem enim aliquam rem. Dolore voluptates nesciunt fuga quisquam?</p>
</section>

<article>
<h2>This is an Article</h2>
<p>This is independent content</p>
<ul>
<li>News Article</li>
<li>Job Post</li>
<li>Blog Post</li>
</ul>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ratione quidem, repudiandae, suscipit illum animi ullam omnis at laborum eaque dolorem aliquam quos iure cum deserunt asperiores facere sed totam magni?</p>
</article>
</main>

<footer>
<h2>Footer</h2>
</footer>

</body>
</html>

/* style.css */


*{
box-sizing: border-box;
}
body{
margin: 0;
}
header{
background-color: hsl(0, 0%, 86%);
text-align: center;
padding: 25px;
}
.navbar{
background-color: hsl(0, 0%, 15%);
height: 50px;
}
aside{
width: 20%;
float: left;
padding: 10px;
}
section{
width: 40%;
float: left;
padding: 10px;
}
article{
width: 40%;
float: left;
padding: 10px;
}
footer{
display: block;
clear: both;
background-color: hsl(0, 0%, 86%);
text-align: center;
padding: 25px;
}
@media screen and (max-width:600px){
aside, section, article{
width: 100%;
}
}

BroCodez
Автор

Thank you for all of these tutorial videos. I took the LinkedIn course on responsive design and you were a lot better in explaining things.

chromaticworkshop
Автор

Bro, this i this is dope. you are the best. love your work.

kadafiblaze
Автор

W3Schools but with text to speech
(I hate reading articles but u have fixed it for me !!)

Epic_coding
Автор

Thank you Bro Coder! I love the simplicity of this design as a starting point.

guchfun
Автор

<!--semantic tags = Keep your content organized
Better for SEO
Assists screen readers and other tech for accessibility
<header> = introductory content
<nav> = navigation bar, links
<main> = main content (section, aside, article, div)
<section> = dependent content
<aside> = independent content
<footer> = closing content

-->

redwanfzr
Автор

pretty good. The content is good. It showing how to make a basic websites with all the basic factors instructed step by step.

efyzfui
Автор

Fantastic...I love it.very clean clear to the point..I'm confident now

qlpwldn
Автор

It is nice to layout using flexbox rather float

yfjsdgzjdnfn
Автор

man, I wish to be as good as you and have the knowledge.

Wolphypwi
Автор

wow, thank you for Going through that. It helped me understand how HTML and CSS work together. Do you have a video that explains the relationship of PHP with the other programing languages? How many programing languages are involved in building a website?

JasonTRogers
Автор

you are doing a great job! Thanks for all

khakimov_
Автор

Thank you very much, this is good stuff.

sdy
Автор

why doesn't my article align with section and aside? it's right under the navbar and no padding adding seems to work. total beginner here😅

tavrel
Автор

Thank you very much @Brocode you are a genius

abduljayconteh
Автор

thank you so much!!!! This isn't plagiarism, is it? taking this code and making something else out of it?

renoman
Автор

hello what if i dont use style.css where to put this code" @media screen and (max-width:600px) {
aside, section, article{
width: 100%;
}
}
"
thankss

alwinsantos
Автор

Sir bro code will you create a full actuall website with design

reaper
Автор

is there a way to make the footer smaller?

SpongeknobSquarenut