Jump to content

Cascading Style Sheets ( CSS ) child ( ">" ) combinator.


Rewillis

Recommended Posts

Attention: w3schools.com forum members:

     The HTML5 code for one of my web pages is shown below:

<html>
   <head>
      <meta content = "text/html; charset = ISO-8859-1" http-equiv = "content-type">
      
      <!-- Adapted and edited by Russell E. Willis as of 12/28/18. -->
      <!-- See additional comments below. -->
      
<style>
div.container {
    width: 100%;
    border: 1px solid gray;
}

article {
  @media only screen and (max-width: 35%) {
    body {
    margin-left: 35%;
    border-left: 1px solid gray;
    padding: 0em;
    overflow: hidden;
          }
    }
}

sup {
  vertical-align: super;
  font-size: x-small;
}

p1 {
   text-indent: 1px;
}

.text1 {
  margin: 15px;
}

.content-box {
  column-count: 2;
  -webkit-column-rule: 1px double purple;
  -moz-column-rule: 1px double purple;
  column-rule: 1px double purple;
  margin: 15px;
}
blockquote {
  margin-top: -0.21em;
  margin-bottom: 15px;
  margin-left: 15px;
  margin-right: 15px;
}
div > table {
  font-family: Georgia;
  border-collapse: collapse;
  width: 90%;
}
td, th {
  border: 1px solid black;
  text-align: center;
  padding: 8px;
}
tr:nth-child(even) {
  background-color: #dddddd;
}
</style>  
<div class="container">

<!-- The following HTML code was adapted and edited from an example located -->
<!-- at the following web site: "https://www.tutorialspoint.com/json/json_ajax_example.htm." -->
		
      <script type = "application/javascript">
         function loadJSON() {
            var data_file = "mydata.json";
            var http_request = new XMLHttpRequest();
            try{
               // Opera 8.0+, Firefox, Chrome, Safari
               http_request = new XMLHttpRequest();
            }catch (e) {
               // Internet Explorer Browsers
               try{
                  http_request = new ActiveXObject("Msxml2.XMLHTTP");
					
               }catch (e) {
				
                  try{
                     http_request = new ActiveXObject("Microsoft.XMLHTTP");
                  }catch (e) {
                     // Something went wrong
                     alert("Your browser broke!");
                     return false;
                  }
					
               }
            }
			
            http_request.onreadystatechange = function() {
			
               if (http_request.readyState == 4  ) {
                  // Javascript function JSON.parse to parse JSON data
                  var jsonObj = JSON.parse(http_request.responseText);

                  // jsonObj variable now contains the data structure and can
                  // be accessed as jsonObj.name and jsonObj.country.
            
                  document.getElementById("Book").innerHTML = jsonObj.book;
                  document.getElementById("Chapter").innerHTML = jsonObj.chapter;
                  document.getElementById("Verse").innerHTML = jsonObj.verse;
               }
            }
			
            http_request.open("GET", data_file, true);
            http_request.send();
         }
		
      </script>
	
      <title>The Holy Bible.</title>
   </head>
	
   <body>
       
      <h3>&#160&#160&#160Please click the "&#x200A;Bible Verses&#x200A;" button below
      to read Bible verses ( <i>ESV</i> ), and read the article also:</h3>
 <!-- Begin: New div section as of 11/08/20. -->
<!-- <div> -->     
      <section><center><section><table class = "src">
         <tr><th><ins>Book</ins></th><th><ins>Chapter</ins></th><th><ins>Verses</ins></th></tr>
         <tr><td><div id = "Book">1 Sa.</div></td>
         <td><div id = "Chapter">30</div></td>
         <td><div id = "Verse">17-20</div></td></tr>
      </table></center></section>

      <center><div class = "central">
         <button type = "button" onclick = "loadJSON()">Bible Verses</button>
      </div></center>
<br>
 <!-- End adapted and edited HTML code section. --> 
<center><ins>T<font size="2" color="black">HE</font> H<font size="2" color="black">OLY</font>
B<font size="2" color="black">IBLE</font>: E<font size="2" color="black">NGLISH</font>
S<font size="2" color="black">TANDARD</font> V<font size="2" color="black">ERSION.</font></ins></center><br>		

<center><img src="Holy_Bible_ESV_6_crop (635x640).jpg" height="300" width="300"></center><br> 
<center><b>"&VeryThinSpace;<ins>Lord, let our eyes be opened.</ins>&VeryThinSpace;"</b></center>
<article>
<p align="justify" class="content-box">&#160&#160&#160In Matthew 20:29-34, it is
written, "&VeryThinSpace;<sup><b>29</b></sup>&VeryThinSpace;<sup><i>n</i></sup>&VeryThinSpace;And
as they went out of Jericho, a great crowd followed him.  &nbsp;<sup><b>30</b></sup>&VeryThinSpace;And
behold, there were two blind men sitting by the roadside, and when they had heard
that Jesus was passing by, they cried out, '&VeryThinSpace;Lord,<sup><i>3</i></sup>
have mercy on us, <sup><i>o</i></sup>&VeryThinSpace;Son of David!&VeryThinSpace;'  &nbsp;<sup><b>31</b></sup>&VeryThinSpace;The
crowd <sup><i>p</i></sup>&VeryThinSpace;rebuked them, telling them to be silent,
but they cried out all the more, '&VeryThinSpace;Lord, have mercy on us, Son of
David!&VeryThinSpace;'  &nbsp;<sup><b>32</b></sup>&VeryThinSpace;And stopping, Jesus
called them and said, '&VeryThinSpace;What do you want me to do for you?&VeryThinSpace;'  &nbsp;<sup><b>33</b></sup>&VeryThinSpace;They
said to him, '&VeryThinSpace;Lord, let our eyes be opened.&VeryThinSpace;'  &nbsp;<sup><b>34</b></sup>&VeryThinSpace;And
Jesus in pity touched their eyes, and immediately they recovered their sight and
followed him.&VeryThinSpace;"  &nbsp;To begin with, in order for the two blind men
to follow Jesus, they first had to be able to see Him.  &nbsp;In 15:13, 14, it is
written ( please read this entire chapter to get the immediate context ), "&VeryThinSpace;<sup><b>13</b></sup>&VeryThinSpace;He
answered, <sup><i>t</i></sup>&VeryThinSpace;'&VeryThinSpace;Every plant that my
heavenly Father has not planted <sup><i>u</i></sup>&VeryThinSpace;will be rooted
up.  &nbsp;<sup><b>14</b></sup>&VeryThinSpace;Let them alone; <sup><i>v</i></sup>&VeryThinSpace;they
are blind guides.<sup><i>3</i></sup>  &nbsp;And <sup><i>w</i></sup>&VeryThinSpace;if
the blind lead the blind, both will fall into a pit.&VeryThinSpace;'"  &nbsp;Jesus
( see 15:1 ) said that those who are spiritually blind, and their spiritually blind
followers, will fall into a pit.  &nbsp;Moreover, in 2 Corinthians 4:3, 4, it is
written, "&VeryThinSpace;<sup><b>3</b></sup>&VeryThinSpace;And even <sup><i>d</i></sup>&VeryThinSpace;if
our gospel is veiled, <sup><i>e</i></sup>&VeryThinSpace;it is veiled only to <sup><i>f</i></sup>&VeryThinSpace;those
who are perishing.  &nbsp;<sup><b>4</b></sup>&VeryThinSpace;In their case <sup><i>g</i></sup>&VeryThinSpace;the
god of this world <sup><i>d</i></sup>&VeryThinSpace;has blinded the minds of the
unbelievers, to keep them from seeing <sup><i>h</i></sup>&VeryThinSpace;the light
of <sup><i>i</i></sup>&VeryThinSpace;the gospel of the glory of Christ, <sup><i>j</i></sup>&VeryThinSpace;who
is the image of God.&VeryThinSpace;"  &nbsp;The god of this world is Satan ( see
Luke 10:18 and John 12:31, for example ).  &nbsp;Sinners ( see Matthew 26:36-46
( especially verse 45, for example ), for example ) are blinded by Satan from seeing
the light of the gospel of the glory of Christ, but the Bible also teaches that
it is possible to escape from the snare of the devil.  &nbsp;In 2 Timothy 2:24-26,
it is written, "&VeryThinSpace;<sup><b>24</b></sup>&VeryThinSpace;And <sup><i>r</i></sup>&VeryThinSpace;the
Lord's servant<sup><i>4</i></sup> must not be quarrelsome but <sup><i>s</i></sup>&VeryThinSpace;kind
to everyone, <sup><i>t</i></sup>&VeryThinSpace;able to teach, patiently enduring
evil, <sup><b>25</b></sup>&VeryThinSpace;correcting his opponents <sup><i>u</i></sup>&VeryThinSpace;with
gentleness.  &nbsp;God <sup><i>v</i></sup>&VeryThinSpace;may perhaps grant them
repentance <sup><i>w</i></sup>&VeryThinSpace;leading to a knowledge of the truth,
<sup><b>26</b></sup>&VeryThinSpace;and they may come to their senses and escape
from <sup><i>x</i></sup>&VeryThinSpace;the snare of the devil, after being captured
by him to do his will.&VeryThinSpace;"  &nbsp;Correcting opponents with gentleness
from the Holy Bible ( see Psalm 119:65-73, 142, and 151; John 17:1, 3, and 17; Romans
15:1-4 ( especially verse 4, for example ); and 2 Timothy 2:15; 3:16, 17, for example
) is a critical factor leading to this result.  &nbsp;Once someone is Scripturally
baptized, his or her conscience has been purified from dead works, for example,
for in Hebrews 9:13, 14, it is written, "&VeryThinSpace;<sup><b>13</b></sup>&VeryThinSpace;For
if <sup><i>o</i></sup>&VeryThinSpace;the blood of goats and bulls, and the sprinkling
of defiled persons with <sup><i>p</i></sup>&VeryThinSpace;the ashes of a heifer,
sanctify<sup><i>6</i></sup> for the purification of the flesh, <sup><b>14</b></sup>&VeryThinSpace;how
much more will <sup><i>q</i></sup>&VeryThinSpace;the blood of Christ, who through
the eternal Spirit <sup><i>r</i></sup>&VeryThinSpace;offered himself without blemish
to God, <sup><i>s</i></sup>&VeryThinSpace;purify our<sup><i>7</i></sup> conscience
<sup><i>t</i></sup>&VeryThinSpace;from dead works <sup><i>u</i></sup>&VeryThinSpace;to
serve the living God.&VeryThinSpace;"  &nbsp;One comes in contact with the blood
of Christ through Scriptural baptism ( see also Romans, chapter 6 ( especially verses
3, 4, and 22, for example ) and Colossians, chapter 1 ( especially verse 20, for
example ), for example ).  &nbsp;Moreover, in Hebrews 10:1, it is written, "&VeryThinSpace;<b>10</b>&thinsp;For
since the law has but <sup><i>v</i></sup>&VeryThinSpace;a shadow <sup><i>w</i></sup>&VeryThinSpace;of
the good things to come instead of the true form of these realities, <sup><i>x</i></sup>&VeryThinSpace;it
can never, by the same sacrifices that are continually offered every year, make
perfect those who draw near.&VeryThinSpace;"  &nbsp;This concept of the shadow of
the law of Moses verses the true form of these realities is demonstrated in Table
1, below:<br>
</article>
<br>
<center><caption><ins>Table 1.</ins>:[&thinsp;The shadow of the law of Moses v. The
true form of these realities.&thinsp;]</caption></center><br><br>
<!-- </div> -->
<table align="center">
   <tr>
     <th>The Shadow Of The Law Of Moses.</th>
     <th>Old Testament Passage.</th>
     <th>The True Form Of These Realities.</th>
     <th>New Testament Passage(s).</th>
   </tr>
   <tr>
     <td>Blood of the Sacrifice thrown on people.</td>
     <td>Exodus 24:1-8.</td>
     <td>Sprinkling with the blood of Jesus Christ.</td>
     <td>1 Peter 1:1, 2, for example.
   </tr>  
   <tr>
     <td>The Garments of the Priests.</td>
     <td>Exodus, chapter 28.</td>
     <td>Clothed with Christ.</td>
     <td>Galatians 3:26, 27; Luke 24:49; and Romans 13:14, for example.</td>
   </tr>
</table><br>   
     
<article>
<p align="justify" class="content-box">It amazes me that, in this New Testament
era, we still see men wearing Old Testament garb and sprinkling water on the congregants.  &nbsp;The
shadow of the law of Moses became obsolete when Jesus Christ died on the cross of
Calvary ( see Luke 23:26-49 ( especially verse 33, for example; <i>KJV,</i> for
example ) and Colossians, chapter 2 ( especially verse 14, for example ), for example
).  &nbsp;This means that we are no longer required to wear Old Testament clothing,
for example.  &nbsp;It also means that we, as full-time evangelists ( see 2 Timothy
4:1, 2, for example ), are not required to throw blood, for example, on anyone.  &nbsp;In
1 Peter 1:1, 2, it is written, "&VeryThinSpace;<b>1</b>&thinsp;Peter, an apostle
of Jesus Christ, to those who are elect exiles of <sup><i>a</i></sup>&VeryThinSpace;the
dispersion in Pontus, Galatia, Cappadocia, Asia, and Bithynia, <sup><b>2</b></sup>&VeryThinSpace;according
to <sup><i>b</i></sup>&VeryThinSpace;the foreknowledge of God the Father, <sup><i>c</i></sup>&VeryThinSpace;in
the sanctification of the Spirit, for obedience to Jesus Christ and <sup><i>d</i></sup>&VeryThinSpace;for
sprinkling with his blood: May <sup><i>e</i></sup>&VeryThinSpace;grace and <sup><i>f</i></sup>&VeryThinSpace;peace
be multiplied to you.&VeryThinSpace;"  &nbsp;The sprinkling that takes place when
someone is Scripturally baptized is figurative in nature.  &nbsp;The blood that
Jesus Christ shed on the cross of Calvary is figuratively sprinkled on the one who
is Scripturally baptized.  &nbsp;In the two examples of the shadow of the law of
Moses, as shown in Table 1, above, the shadows became obsolete, but the general
concept associated with each shadow is carried forward into the New Testament, and
applies to us today, as Christians ( see Acts, chapter 11 ( especially verse 26,
for example ), for example ).  &nbsp; &#128366</p>
</article>

<!-- &#160&#160&#160&#160&#95&#95&#95&#95&#95<br> -->
<!-- <blockquote align="justify"><font size="2" color="black"><b>1.</b> <i>HOLMAN <b>BIBLE</b> -->
<!-- DICTIONARY,</i> With summary definitions and explanatory articles on every Bible subject; -->
<!-- introductions and teaching outlines for each Bible book; in-depth theological articles; -->
<!-- plus internal maps, charts, illustrations, scale reconstruction drawings, archaeological -->
<!-- photos, and atlas, <b>GENERAL EDITOR:</b> BUTLER, TRENT C., PH.D., HOLMAN BIBLE -->
<!-- PUBLISHERS, NASHVILLE, TENNESSEE, &copy; Copyright 1991 Holman Bible Publishers, -->
<!-- pp. 1441, 1442.</blockquote> -->

<!-- &#160&#160&#160&#160&#95&#95&#95&#95&#95<br> -->
<!-- <p1 align="justify" class="text1"><font size="2" color="black"><b>1.</b>  https://www.archives.gov/exhibits/featured-documents/emancipation-proclamation</font>.</p1><br> -->
<!-- <p1 align="justify" class="text1"><font size="2" color="black"><b>2.</b>  NEW ILLUSTRATED -->
<!-- <b>W<font size="1">EBSTER'S</font> D<font size="1">ICTIONARY</font></b> <i>Including</i> -->
<!-- <b>T<font size="1">HESAURUS</font></b> <i>of</i> <b>S<font size="1">YNONYMS &</font> A<font -->
<!-- size="1">NTONYMS</font></b>, <b>PMC Publishing Company, Inc.</b>, p. 315.</font></p1><br><br> -->
<!-- <p1 align="justify" class="text1"><font size="2" color="black"><b>2.  G<font size="1"
color="black">OD'S</font> W<font size="1" color="black">ORD<sub>&#174</sub></font>
<font size="1" color="black">TRANSLATION</font>: <i>P<font size="1" color="black">RAY</font>
<font size="1" color="black">THE</font> S<font size="1" color="black">CRIPTURES</font>
B<font size="1" color="black">IBLE</font></b>,</i> E<font size="1" color="black">DITOR</font>:
J<font size="1" color="black">OHNSON</font>, K<font size="1" color="black">EVIN</font>,
B<font size="1" color="black">ETHANY</font> H<font size="1" color="black">OUSE</font>
P<font size="1" color="black">UBLISHERS</font>, pp. xv, 1554.</p1><br>
<br> -->
<!-- <p1 align="justify" class="text1"><font size="2" color="black"><b>2.</b>  <i>HOLMAN -->
<!-- <b>BIBLE</b> DICTIONARY,</i> <b>GENERAL EDITOR: </b>BUTLER, TRENT C., PH.D., HOLMAN -->
<!-- BIBLE PUBLISHERS, NASHVILLE, TENNESSEE, &#169 Copyright 1991 Holman Bible Publishers, -->
<!-- p. 723.</font></p1><br><br> -->

</div> 
</body>
		
</html>

I have been working on this code for hours trying to get the first "<table></table>" section ( i.e., "'Book,' 'Chapter,' 'Verse,'" etc. ) to appear on my web page without borders and shading, while also trying to get the second "<table></table>" section ( i.e., "Shadow of the law of Moses v. The true form of these realities." ) to appear with borders and shading.  I am attempting to do this by declaring the table in the CSS ( "<style></style>" ) section of my web page, using the CSS child combinator ( i.e., ">" ).  The general form of this declaration is "div > table { ... }."  This strategy is not working.  Am I allowed to declare a table as just described?  Thank you ( see Colossians 3:15, for example ) for your help.  Keep in touch.

Sincerely in Christ,

Russell E. Willis

P.S. - Please read Proverbs 23:23.

Edited by Rewillis
Link to comment
Share on other sites

Perhaps if you remove <div class="container"> from <head>...</head> and place in <body></body> (oohh,🤪 fit young body) where it should be! You! would be on the way to getting it to work

</style>  
<div class="container">

'>' means  it must be a DIRECT child from parent

<div> 
  <table>
    ....
  </table>
  
</div>

IS good! sayeth the lord.
  

else the naughty evil one would confuse you suggesting

<div> 
<section>
  <!--<center> NO one uses center tag anymore except the evil one and Heathans-->
      <table>
        ....
      </table>
   <!--</center> NO one uses center tag anymore except the evil one and Heathans-->
  </section>
</div>

IS good! sayeth the evil one.

media queries are positioned below the main default css, they are not surrounded by selector, as there restyling is determined by device size, NOT selector, the selector within it determine the styling to change om chosen device viewport width.

Link to comment
Share on other sites

Attention: dsonesuk:

     I made the changes to my web page that you suggested, above, but the problem was not solved.  I edited my web page back to its original form.  My apologies ( see 1 Samuel, chapter 25, for example ) for the remark I made to you regarding your W3Schools.com forum user name approximately two or three years ago.  In the meantime, I suppose I will wait for someone else on this forum to respond with a solution to my problem.  Keep in touch. 🙂

Sincerely in Christ,

Russell E. Willis.

P.S. - Please read Proverbs 23:23.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...