Forum Moderators: not2easy
<!DOCTYPE HTML>
<html>
<head>
<title>Last child testing</title>
<style type="text/css">
body {
font-family: serif;
max-width: 50em;
padding: 1em 0 0 1em;
line-height: 1.4;
}
.mycontainer aside :first-child {
color: orange;
}
.mycontainer aside.tags ul li a {
font-size: 0.75em;
font-style: italic;
border-bottom: 1px solid #666;
}
.mycontainer aside.tags ul li a:last-child {
border-bottom: 0;
}
</style>
</head>
<body>
<div class="mycontainer">
<aside class="tags">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<div class="sidebar">
<ul>
<li><a href="https://www.xxx.html"></a>Link1</li>
<li><a href="https://www"></a>Link2</li>
<li><a href="https://www"></a>Link3</li>
</ul>
</div>
</aside>
</div>
</body>
</html>
<a href="https://www"></a>Link3</li> <a href="https://www">Link3</a></li> li a:last-child li:last-child a
aside ul li a {
font-size: 0.75em;
font-style: italic;
}
aside ul li:last-child a {
text-decoration:none;
}
text-decoration:none;I think we did finally see a CSS that specified a border-bottom, so that has to be dealt with too. I think we did finally see a CSS that specified a border-bottom, so that has to be dealt with too.
But I can't wrap my head around why the code needs to be this complex.
Simple code is not always the best solution.