Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions 00-HTML-CSS-basics/CSS Basics/CSS Basics 2.1/css/firstLayout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
header, aside, footer, nav, section {
background-color: rgb(102,102,102);
}

header, aside, footer, nav{
display: flex;
justify-content: center;
align-items: center;
}
body {
color: white;
background-color: rgb(50, 50, 50);
font-size : 20px;
margin: auto;
}

header {
margin-top: 10px;
margin-left: 10px;
margin-right: 10px;
border-radius: 0.7rem;
height: 50px;
text-align: center;
}

nav {

margin-left: 10px;
margin-top: 10px;
margin-right: 69,2%;
border-radius: 0.7rem;
width: 30%;
height: 500px;
text-align: center;

}

section {
text-align: center;
margin-left: 32%; /*31.5*/
border-radius: 0.7rem;
height: 500px;
width: 36%;
margin-top: 10px;
position: absolute;
top: 60px;
}
.sectionHeader {
font-size: 18px;
text-align: center;

background: rgb(153, 153, 153);
border-radius: 0.7rem;
margin-left: 10px;
margin-right: 10px;
margin-top: 10px;
height: 40px;
}

.sectionFooter {
height: 40px;
background: rgb(153, 153, 153);
font-size: 18px;
}
.sectionArticle {
height: 350px;

}
aside {

margin-left: 69.2%;
margin-top: 10px;
margin-right: 10px;
border-radius: 0.7rem;
width: 30%;
height: 500px;
text-align: center;
position: absolute;
top: 60px;
}

footer {
text-align: center;

margin-top: 10px;
border-radius: 0.7rem;
margin-left: 10px;
margin-top: 10px;
margin-right: 10px;
margin-bottom: 10px;
height: 50px;

}

article {
text-align: center;
height: 350px;
margin-top:10px;
background-color: rgb(153, 153, 153);
border-radius: 0.7rem;
margin-left: 10px;
margin-right: 10px;
}

button {
margin-top: 10px;
}

142 changes: 142 additions & 0 deletions 00-HTML-CSS-basics/CSS Basics/CSS Basics 2.1/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@

/* This is the older
header,footer{
background: magenta;
} */

/*If i have n classes finished in r , we can do : */
/*Selecting all classes in html and finished in r*/
[class$="r"]{
background: magenta;
}



.container{
text-align:center;
border: 2px solid black;
background-color: rgb(38, 82, 230);
font-family: 'Courier New', Courier, monospace; /*Global font family*/
font-weight: 700; /* This override de globall font-weight*/
}

header {
margin-top: 10px;
border: 2px solid black;
margin-left: 5px;
margin-right: 5px;
border-radius: 0.3rem;
height: 50px;
text-align: center;
}

nav {
border: 2px solid black;

margin-left: 5px;
margin-top: 10px;
border-radius: 0.3rem;
width: 30%;
height: 500px;
text-align: center;
}

section {
text-align: center;
border: 2px solid black;
margin-left: 31.4%;
border-radius: 0.3rem;
height: 500px;
width: 37%;
position: absolute;
top: 75px;
}

.sectionHeader {
font-size: 18px;
text-align: center;
border: 2px solid black;

border-radius: 0.3rem;
margin-left: 5px;
margin-right: 5px;
margin-top: 10px;
height: 40px;
}

.sectionFooter {
height: 40px;

font-size: 18px;
}

aside {
border: 2px solid black;
margin-left: 69.5%;
margin-top: 10px;
margin-right: 10px;
border-radius: 0.3rem;
width: 29.5%;
height: 500px;
text-align: center;
position: absolute;
top: 65px;
}

footer {
text-align: center;
border: 2px solid black;
margin-top: 10px;
border-radius: 0.3rem;
margin-left: 5px;
margin-top: 10px;
margin-right: 5px;
margin-bottom: 10px;
height: 50px;

}

article {
text-align: center;
border: 2px solid black;
margin-top:10px;
border-radius: 0.3rem;
margin-left: 5px;
margin-right: 5px;
height: 350px;
}


/*Overriding classes */
[class$="r"]{ /*Finished in r background must be magenta*/
background-color:magenta;
}
.header {
font-size: 46px;
}
.footer {
font-size: 10px;
}
[class*="a"]:not([class$="r"] ){ /*Contains an a but not finish with r*/
background: blue;
}
.article {
font-size: 14px;
}
.section {
font-size: 14px;
}
.nav{
font-size: 12px;
}
.aside {
font-size: 10px ;
}
/*Part 2.3 Specificity
Excercise 7
The best way to override the background is doing this*/
div[style]{
background: green !important; /*This is the best way to override de inline style porperty !important always wins*/
margin-top: 10px;
}

Loading