/    Sign up×
Community /Pin to ProfileBookmark

last-child does not work with grid rows?

I am trying to add a line in bottom of the list, but I cannot get it to work.
https://jsfiddle.net/oxu83anj/2/
What am I doing wrong?

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@sibertauthorJul 24.2019 — ["last-child does not work with flexbox?","last-child does not work with grid rows?"]
Copy linkTweet thisAlerts:
@SempervivumJul 24.2019 — It works when you use `last-of-type</C>:
<CODE> .row:last-of-type {
border-bottom: solid 1px;
}
</CODE>However I do not really understand why <C>
last-child`
doesn't work as the common explanations, e. g. here:

https://stackoverflow.com/questions/24657555/what-is-the-difference-between-first-child-and-first-of-type

are not applicable. Maybe someone else can explain.
Copy linkTweet thisAlerts:
@SempervivumJul 24.2019 — PS: Explanation found: The HTML inspector shows that there is a script tag after the last div.row in jsfiddle which matches `last-child`.
Copy linkTweet thisAlerts:
@sibertauthorJul 24.2019 — > @Sempervivum#1606700 It works when you use last-of-type:

I works! Tank you! https://jsfiddle.net/wvfs43be/2/
Copy linkTweet thisAlerts:
@AlbertDavidJul 26.2019 — Glad you got that sorted out.
×

Success!

Help @sibert spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...