Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #38171
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: HTML dom "document parent, child notation" |
| Date | 2020-01-28 15:25 +0100 |
| Message-ID | <h9aui9Ft3gqU1@mid.individual.net> (permalink) |
| References | <eab890f6-26af-41ce-b4cc-964fddf3b7a7@googlegroups.com> |
On 28.01.20 08:18, Jonas Thörnvall wrote:
> What is the justification for using the parent child notation between
> documents that is loaded from same source, for example iframes?
Example?
> What is the idea behind it, why is it there?
Because there can be elements which are parents of other elements.
For example:
<ol id="mylist">
<li>...</li>
<li>...</li>
<li>
<ul>
<li>...</li>
<li>...</li>
</ul>
</li>
</ol>
So <li> is a child of <ol> but there are also <li> elements which are
children of <ul>.
if you want to define a style for those <li> elements which children of
<ul> but not <ol>, you can define this as following:
ul > li {
}
Or you need a rule which styles only elements which are inside an <ul>
element which is a child of <li> inside <ol>:
ol > li > ul > li {
}
And you can also style all elements which are children of <ol> with tge
ID "mylist", no matter if "direct" children or just somewhere inside the
hierarchy:
ol#mylist li {
}
More about this:
<https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors>
--
Arno Welzel
https://arnowelzel.de
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
HTML dom "document parent, child notation" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-01-27 23:18 -0800
Re: HTML dom "document parent, child notation" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-01-27 23:22 -0800
Re: HTML dom "document parent, child notation" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-01-27 23:47 -0800
Re: HTML dom "document parent, child notation" dr.j.r.stockton@gmail.com - 2020-01-28 01:37 -0800
Re: HTML dom "document parent, child notation" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-01-28 01:59 -0800
Re: HTML dom "document parent, child notation" JJ <jj4public@vfemail.net> - 2020-01-28 18:43 +0700
Re: HTML dom "document parent, child notation" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-01-28 03:52 -0800
Re: HTML dom "document parent, child notation" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-01-28 03:59 -0800
Re: HTML dom "document parent, child notation" JJ <jj4public@vfemail.net> - 2020-01-29 20:07 +0700
Re: HTML dom "document parent, child notation" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-02-05 08:02 -0800
Re: HTML dom "document parent, child notation" "R.Wieser" <address@not.available> - 2020-02-06 12:50 +0100
Re: HTML dom "document parent, child notation" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-02-05 08:05 -0800
Re: HTML dom "document parent, child notation" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-02-05 08:06 -0800
Re: HTML dom "document parent, child notation" "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-01-28 05:17 -0800
Re: HTML dom "document parent, child notation" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-01-28 17:54 -0800
Re: HTML dom "document parent, child notation" Arno Welzel <usenet@arnowelzel.de> - 2020-01-28 15:25 +0100
csiph-web