Если вы посмотрите на www.markallanholley.com
, вы заметите, что изображение девушки-робота справа вообще не реагирует. Я закодировал то, что считал правильным способом справиться с этим, но мне совершенно не повезло. Мне было интересно, взглянет ли кто-нибудь.
Я абсолютно уверен, что CSS правильно нацелен на HTML, потому что я провел небольшой тест, изменив цвет фона на зеленый, а фон стал зеленый. Затем я стер эту строку кода.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
p {
font-size: 110%;
font-family: 'Work Sans', sans-serif;
}
nav li {
display: inline-block;
list-style: none;
}
footer li {
display: inline-block;
list-style: none;
}
.container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(1fr, 10px, 1fr));
grid-template-rows: 1fr, 80%, 1fr;
grid-row-gap: 5px;
grid-column-gap: 5px;
}
.top {
grid-row: 1 / span 1;
grid-column: 1 / span 3;
}
.leftsection {
grid-row: 2 / span 1;
grid-column: 1 / span 1;
}
.divider {
grid-row: 2 / span 4;
grid-column: 2 / span 1;
}
.rightsection {
grid-row: 2 / span 1;
grid-column: 3 / span 1;
}
.bottom {
grid-row: 3 / span 1;
grid-column: 1 / span 3;
}
.responsive {
max-width: 100%;
height: auto;
}
img:hover {
transform: scale(1.1);
}
/* unvisited link */
a:link {
color: black;
font-weight: bold;
text-decoration: none;
}
/* visited link */
a:visited {
color: gray;
font-weight: bold;
text-decoration: none;
}
/* mouse over link */
a:hover {
color: purple;
font-weight: bold;
text-decoration: none;
}
/* selected link */
a:active {
color: lightpurple;
font-weight: bold;
text-decoration: none;
}
/* Fonts from Google Fonts */
/*
font-family: 'Forum', cursive;
font-family: 'Patua One', cursive;
font-family: 'Work Sans', sans-serif;
*/
<link href="https://fonts.googleapis.com/css2?family=Forum&family=Patua+One&family=Work+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<div class="container">
<nav class="top">
<img src="http://www.markallanholley.com/links/topnavbackground.jpg">
<a href="../index.html"><img src="http://www.markallanholley.com/links/mahlogo.png"></a>
<ul>
<li><a href="bio.html">Bio</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="community/index.php">Community</a></li>
<li><a href="login.html">Login</a></li>
<li><a href="portfolio.html">Portfolio</a></li>
</ul>
</nav>
<section class="leftsection">
<h1>Hello and Welcome</h1>
<br>
<p>I’m a designer living in Central New York. This website is still being constructed. If you’d like to learn more about me and the type of work that I do, please select <a href="bio.html">Bio</a> or <a href="portfolio.html">Portfolio</a> from the links.
If you’ve hired me and if you want to view a work in progress, please log in using the <a href="login.html">Login</a> link. I have a Contact form for you if you select <a href="contact.html">Contact</a>, or you can email me anytime at:</p>
<br>
<address>
<a href="mailto:markallanholley@gmail.com">markallanholley@gmail.com</a>
</address>
<br>
<p>The Community link is just me practicing installing forum software. You’re welcome to register if you’d like, but I don’t anticipate any activity there.</p>
</section>
<div class="divider">
<img src="http://www.markallanholley.com/links/verticaldivider.png" height="966" width="10">
</div>
<section class="rightsection">
<figure>
<img src="http://www.markallanholley.com/links/notarobot.jpg" alt="Sad robot looking at computer." class="responsive">
<figcaption>"Not A Robot" 2019, Blender, Photoshop</figcaption>
</figure>
</section>
<footer class="bottom">
<ul>
<li><a href="bio.html">Bio </a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="community/index.php">Community</a></li>
<li><a href="login.html">Login</a></li>
<li><a href="portfolio.html">Portfolio </a></li>
<li>• Copyright 2020 Mark Holley</li>
</ul>
</footer>
</div>
JSFiddle