In the ss you see an Inspect view of a page I’m styling. You can see that there is a grid. It has 6 rows and 7 columns (see bio-container.css). You can see the elements that the CSS files create. There are several problems that I cannot figure out. I think I’ve looked at it too long and lost the fresh eyes needed to spot errors.
-
Why does the ‘Marriage details lorem ipsum’ text appear where it does and not in the font defined for it? There is a file (bio-7marriage-data.css) that defines the location as the row 1 column 7 that also defines the same font as that elsewhere on the screen. The css file calls for a top margin of 65px just as all row 1 child elements in the grid have. I think this means that the link to the css file is not defined correctly; but the css stying is defined exactly like the others except for row and column definitions, and the link statement in the HTML is the same. I even copied the file name information from VS Code EXPLORER for the file and pasted it in the html link href statement to be sure there was no fat fingering.
-
Why does the long box - defined in bio-11children.css - appear overlapping the boxes as shown? The location is defined as row 2 column 3. It starts in column 3, but it does not appear in row 2 as the ss shows.
HTML (testingstyles.html)
<!DOCTYPE html>
<HTML>
<HEAD>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Birthstone">
</HEAD>
<link
rel="stylesheet"
href="/Styles/ancestor-container.css" >
<link
rel="stylesheet"
href="/Styles/bio-1masthead.css" >
<link
rel="stylesheet"
href="/Styles/bio-2name.css" >
<link
rel="stylesheet"
href="/Styles/bio-container.css" >
<link
rel="stylesheet"
href="/Styles/bio-3photo.css" >
<link
rel="stylesheet"
href="/Styles/bio-4birth-label.css" >
<link
rel="stylesheet"
href="/Styles/bio-5birth-data.css" >
<link
rel="stylesheet"
href="/Styles/bio-6marriage-label.css" >
<link
rel="stylesheet"
href="Styles/bio-7marriage-data.css" >
<link
rel="stylesheet"
href="/Styles/bio-8death-label.css" >
<link
rel="stylesheet"
href="/Styles/bio-9death-data.css" >
<link
rel="stylesheet"
href="/Styles/bio-10text.css" >
<link
rel="stylesheet"
href="/Styles/bio-11children.css" >
<link
rel="stylesheet"
href="/Styles/bio-12thumbnails.css" >
<link
rel="stylesheet"
href="/Styles/bio-.css" >
<!-- END of external links
-->
<STYLE>
</STYLE>
<BODY>
<!-- BEGINNING of page -->
<div class="ancestor-container">
<div class="bio-1masthead">
<div class="bio-2name">
Uncle Sam
</div>
</div> <!-- Ends bio-1masthead -->
<div class="bio-container">
<div class="bio-3photo">
<!-- <img src="/Images/uncle-sam-i-want-you.png" alt="Uncle Same Wants You NOW!"> -->
Uncle Sam Wants You !
</div>
<div class="bio-4birth-label">
Birth
</div>
<div class="bio-5birth-data">
<!-- Values for this information
Birthdate
Birthplace
Mother
Father
to be supplied by javascript entry form and displayed to the right of constants
REVIEW CSS ::before & ::after and javascript variables
-->
Born: July 4, 1776<br>
Birthplace: Independence Hall,
Philadelphia, PA<br>
Mother: Necessity<br>
Father: Jefferson, Madison, Monroe and Others
</div>
<div class="bio-6marriage-label">
Marriage
</div>
<div class="bio-7marriage-data">
Marriage details lorem ipsum
</div>
<div class="bio-8death-label">
Death
</div>
<div class="bio-9death-data">
<!-- REVIEW CSS ::before & ::after and javascript variables
-->
Date: Still Alive and Well<br>
Place: <br>
Burial: It didn't happen<br>
extra line
</div>
<div class="bio-10text">
Biographical data lorem ipsum
</div>
<div class="bio-11children">
Children birth order with names lorem ipsum
</div>
<div class="bio-12thumbnails">
Thumbnails: tiny pics and icons go here
</div>
<!-- End of page -->
</div> <!-- Ends bio-container -->
</div> <!-- Ends ancestor-container -->
</BODY>
</HTML>
/* Define space for biographical info
*/
.bio-container
{
display: grid;
width: 1210px;
height: 450px;
grid-template-rows: 75px 75px 75px 75px 75px 75px;
grid-template-columns: 300px 32px 220px 32px 220px 50px 220px;
column-gap: 6px;
}
/* space for marriage data: spouse/date/place */
.bio-7marriage-data {
grid-row-start: 1;
grid-row-end: 1;
grid-column-start: 7;
grid-column-end: 7;
width: 200px;
height: 70px;
margin-top: 65px;
border-style: ridge;
border-width: 1.5px;
border-radius: 5px;
border-color: brown;
font-family: "Birthstone";
font-size: 13px;
font-weight: bold;
padding-left: 5px;
}
I’m still working on getting this project set up as a public github repo. Maybe tomorrow.