CSS Colors, Images, Links
CSS Colors, Images, Links
• Rounded Borders
• The border-radius property is used to add rounded borders to an element
img{
border-top-left-radius: 50%;
border-bottom-right-radius: 50%;
}
Links
a:link {
• The four links states are: font-weight: bold;
• a:link - a normal, unvisited link text-decoration: none;
color: #B7A5DF;
• a:visited - a link the user has visited }
• a:hover - a link when the user mousse over it a:visited {
font-weight: bold;
• a:active - a link the moment it is clicked text-decoration: none;
color: #D4CDDC;
}
https://www.w3schools.com/css/css_combinators.asp
Combinators - Descendant Selector
The descendant selector matches
ul li { <ul> all elements that are descendants
color: crimson; <li>First</li> of a specified element
} <li>Second</li>
<ol>
li { <li>third</li>
color: blue; <li>fourth</li>
} </ol>
<li>Last</li>
</ul>
https://developer.mozilla.org/en-US/docs/Web/CSS/Descendant_selectors
Combinators - Child Selector
The child selector selects all
ul > li { <ul> elements that are the immediate
children of a specified element
color: crimson; <li>First</li>
} <li>Second</li>
<ol>
<li>third</li>
li { <li>fourth</li>
color: blue; </ol>
} <li>Last</li>
</ul>
https://developer.mozilla.org/en-US/docs/Web/CSS/Descendant_selectors
Combinators - Adjacent Sibling Selector
The adjacent sibling selector
div + p {
selects the first element that is
background-color: yellow;
the adjacent siblings of a specified
}
element.
<div>
<p>Paragraph 1 in the div.</p>
<p>Paragraph 2 in the div.</p>
</div>
<div>
<p>Paragraph 1 in the div.</p>
<p>Paragraph 2 in the div.</p>
</div>