Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
3.6 kB
3
Indexable
Never
/*Navbar------------------------------------------------------------------------------------------------------------------------------*/

* {
    margin: 0px;
    padding: 0px;
}
.Navbar {
    background: #333;
    width: 100%;
    position: fixed;
}
.Navbar h2 {
    font-size: 22px;
    color: #fff;
    width: 20%;
    float: left;
    display: inline;
    padding-top: 4px;
}
.Navbar > ul {
    list-style: none;
    width: 80%;
    float: left;
    margin: 0px;
    padding-inline-start: 0px;
}
.clear {
    clear: both;
}
.Navbar > ul li {
    display: inline-block;
    width: 100px;
}
.Navbar > ul li a {
    color: #fff;
    background-color: #333;
    text-decoration: none;
    display: block;
    padding: 8px;
}
.Navbar > ul li {
    position: relative;
}
.Navbar > ul li ul {
    position: absolute;
    display: none;
}

/*Dropdown------------------------------------------------------------------------------------------------------------------------------*/

.Navbar > ul li a:hover + ul {
    display: block;
}

/*CSS form------------------------------------------------------------------------------------------------------------------------------*/

form input ,form select {
    width: 60%;
    margin-left: 50px;
    margin-top: 10px;

}
.haha {
    margin-left:75px;
}
input[type =text]:focus{
    background-color: aqua;
    border: 3px solid #555;
}
input[type =password]:focus{
    background-color: aqua;
    border: 3px solid #555;
}
form {
    height: 30%;
    background: gray;
}
label {
    color: #fff;
}

/*After and Before------------------------------------------------------------------------------------------------------------------------------*/

.ulitem {
    padding: 20px;
    list-style: none;
}
.ulitem li {
    vertical-align: middle;
}
.ulitem li::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    background: red;
    vertical-align: middle;
    margin-right: 10px;
}

/*CSS units------------------------------------------------------------------------------------------------------------------------------*/

html {
    font-size: 16px; /*par defaut*/
}
.parent {
    font-size: 10px;
}
.child {
    background: red;
    width: 50vw;
}
/*em relative to parent element (x la font d element parent)
rem relative to HTML ( x la size de font HTML)
vw the verticale marg of the view bord width
vh the horizontal marg of the view bord hight*/

/*Gallery------------------------------------------------------------------------------------------------------------------------------*/

img {   /*mettre un image dans un lien */
    height: 50px;
    width: 100px;
}

/*More about Nesting------------------------------------------------------------------------------------------------------------------------------*/

p.item { /*juste les elements paragraphe qui on un class item */
    color: red;
}

/*Specificity------------------------------------------------------------------------------------------------------------------------------*/

/* id a toujour la priorite sur la class */
#demo {
    color: yellowgreen;
}
/*degre 100*/
.local {
    color: blue;
}
/*degre 10*/
/*la regle de calcule de degre de Specificity:
Styleinline id (class/pseudo class/attribut selector) element
exemple:
div .item p{
}
0 0 1 2

#demo div [id="item"] p span {
}
0 1 1 3

donc le desieme exemple a la priorite d execution sur le premier exemple
*/