Hallo, why does this CSS work stand alone in a fiddle: [url]https://jsfiddle.net/kpoypc33/[/url] but not in the context of my complete page: [url]http://ulrichbangert.de/heimat/mediaelement/2014-03-29_Harz_Stabkirche_Glockenspiel_Playlist.php[/url] (border top missing).
@tracknutFeb 01.2016 — #In the complete page, the playlistitem is not the first child, it's the second child of its parent. In the jsfiddle you don't have the same code. You may want to look at nth-child(2) instead
@SempervivumauthorFeb 01.2016 — #I see, it works perfectly now. My fault was that I assumed, that "first-child" refers to the set of matched elements for ".playlistitem".
interesting info. Have you lived in Berlin? Near my home there are some more chimes, at the market place in Goslar, in Wernigerode near the Harz and in a hospital in Hannover.
@TrainFeb 01.2016 — #1966 -1969 I was stationed in Berlin. Did quite a bit of travel and remember hearing the chimes in lots of places, be darn if I can remember the town/city names now though. 50 years is awhile ago.
@remedyFeb 02.2016 — #The :first-child selector allows you to target the first element immediately inside another element. It is defined in the CSS Selectors Level 3 spec as a “structural pseudo-class”, meaning it is used to style content based on its relationship with parent and sibling content.
Instead of giving it a class (e.g. .first), we can use :first-child to select it:
p:first-child {
font-size: 1.5em;
}
Using :first-child is very similar to :first-of-type but with one critical difference: it is less specific. :first-child will only try to match the immediate first child of a parent element, while first-of-type will match the first occurrence of a specified element, even if it doesn't come absolutely first in the HTML. In the example above the outcome would be the same, only because the first child of the article also happens to be the first p element. This reveals the power of :first-child: it can identify an element with relation to all its siblings, not just siblings of the same type.
**Links removed by Site Staff so it doesn't look like you're spamming us. Please don't post them again.**