Note that there are some explanatory texts on larger screens.

plurals
  1. POTargeting the last list item
    primarykey
    data
    text
    <pre><code>&lt;ul id="nav-items" class="links"&gt; &lt;li&gt;&lt;a href="http://www.thevoiceofjeremydonahue.com/about"&gt;About&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.thevoiceofjeremydonahue.com/projects"&gt;Projects&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.thevoiceofjeremydonahue.com/contact"&gt;Contact&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>I am working with this unordered list that you see above. Ultimately I'm trying to target the last list item "Contact" in order to style it slightly different than the rest. Now to be very specific this is how my css looks so far for this particular list:</p> <pre><code>#nav-items { border: 2px solid white; background: rgb(255, 75, 0); border-radius: 10% 10% 80% 80%; position: absolute; top: 10px; right: 10px; margin-right: 1px; font-family: 'Libre Baskerville', serif; font-size: 40px; } #nav-items &gt; li { margin-bottom: 60px; margin-right: 58px; margin-top: 40px; text-align: center; background: black; padding: 15px; border: 2px solid white; } #nav-items &gt; li a:hover { color: white; border-radius: 50%; /*This one (border-radius) isn't working either*/ } </code></pre> <p>Now, in order to target the last one my first choice was to go for</p> <pre><code>a[href$="contact"] { property: "value"; } </code></pre> <p>but that didn't work...so I tried</p> <pre><code>#nav-items:last-child { property: "value"; } </code></pre> <p>I've even tried </p> <pre><code>ul li a {property: "value"} </code></pre> <p>that didn't work, and on top of that I wouldn't have wanted to do it that way anyway because I have other anchors inside of list items elsewhere on the page that I don't want affected</p> <p>I've also tried all of the other substring matching attribute selectors ~, ^, *...and none of those worked either...</p> <p>I've tried </p> <pre><code>#nav-items &gt; li a {property: "value"} </code></pre> <p>nothing...</p> <p>there's probably a couple things that I've tried that I can't remember...</p> <p>essentially I'm trying to affect the border-radius of the very last list item</p> <p>I've even validated both my HTML and CSS just to be sure</p> <p>I've got nothing...you?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload