thanks. I donât have codepen set up yet, so will post here:
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles.css" />
<title>Pol</title>
</head>
<body>
<header>
<h1>Put in title</h1>
</header>
<div class = "nav_plus_bios">
<nav id="navbar" class="navbar">
<ul>
<li class = "quicklinks">QUICKLINKS</li>
<li><a href="#james_joyce">James Joyce</a></li>
<li><a href="#natalie_portman">Natalie Portman</a></li>
<li><a href="#jrr_tolkien">J.R.R. Tolkien</a></li>
<li><a href="#shakira">Shakira</a></li>
</ul>
</nav>
<section class = "main_section_excl_nav">
<p id="intro_text" class="intro_text">
'Polywhattery?' I hear you ask. Although it might sound like a potentially serious illness, this might be the type of illness you would wish to have. 'Polyglottery' is in fact derived from the Greek words 'polloi' (meaning 'many') and 'glotta', meaning 'languages' and refers to the ability to speak several languages. Click on the following buttons to read about some well-known polyglots...
</p>
<div class = "james_joyce_container bio_container_hover" id = "james_joyce_container">
<img src="Images/jamesjoyce.jpg" class = "james_joyce_img" alt = "Image of James Joyce" onclick="toggle4"/>
<!--<div class="biosPlusQuickFactsContainer">*-->
<p class = "james_joyce_biography" id = "james_joyce_biography">
<strong>James Joyce</strong> (1882-1941) The famous Irish writer was
known for his love of languages and literature. He was initially a
teacher and a translator; he taught English all over Europe and during
his travels he was able to pick up a variety of other languages,
including Italian, German, and French. It is hard to determine how many
he actually spoke, but heâs most often credited with communicating in
between 13 and 17 other languages. His Ulysses contains fragments in
Hebrew, Latin, Greek, Spanish, Irish Gaelic, and more. Apart from that,
he was also a scholar who studied the nature of languages, so he could
probably read a wider variety of texts. Apparently he only learned
Norwegian to read Ibsen in his original language.
</p>
</div>
<div class="natalie_portman_container bio_container_hover" id="natalie_portman_container" >
<img src="Images/natalie_portman.jpg" class = "natalie_portman_img" alt = "Image of Natalie Portman"/>
<p class = "natalie_portman_biography">
The famous Oscar-winning actress,
<strong>Natalie Portman</strong> is one of the most widely-known
polyglots among celebrities. Born in Israel to an Israeli father and
American mother, she later moved to the United States; she therefore
grew up speaking both Hebrew and English. Aside from her acting talent,
she is known for her thirst for knowledge (sheâs a Harvard graduate with
a BA in psychology), and since she was raised as a bilingual-speaker,
sheâs also an avid learner of languages. Today she speaks not only
English and Hebrew, but also Arabic, German, French, Spanish, and
Japanese. Sheâs a native-speaker of the first two and has conversational
abilities in the rest, giving interviews and participating in tv
programs in all of them.
</p>
</div>
<div id="jrr_tolkien_container" class="jrr_tolkien_container bio_container_hover">
<img src="Images/jrr_Tolkien.png" class="jrr_tolkien_img" alt = "Image of JRR Tolkien">
<p class = "jrr_tolkien_biography">
Itâs not an exaggeration to say that
<strong>J.R.R. Tolkien</strong> is one of the most famous polyglots and
most impressive linguists in the history of humankind. The father of
Middle Earth was a remarkable figure even among the most talented
polyglots â he could speak 35 (!) different languages, both modern and
ancient. He became so proficient in learning languages that at some
point he learned Finnish just for fun. But thatâs not all â he used that
impressive knowledge and ability to create languages of his own, the
most widely-known being Quenya, one of the Elvish languages from his
books.
</p>
</div>
<div id="shakira_container" class="shakira_container bio_container_hover">
<img src="Images/shakira.jpg" class = "shakira_img" alt = "Image of Shakira"/>
<p class = "shakira_biography">
<strong>Shakira</strong> was born in Columbia, so her native language is
Spanish. Apart from that, she can also speak English and Portuguese,
both fluently â the former because of her early boyfriend and later
international career, and the latter because of an extended music tour
she did in Brazil during her teens. Moreover, sheâs reported to be able
to communicate in Italian, Catalan, and Arabic. Right now, as a mother,
she often stresses the importance of multilingualism and has tried to
expose her sons to numerous languages from the very beginning.
</p>
</div>
<!-- QUICKFACTS BUTTONS-->
<div class="quickfacts">
<p>Interesting facts about languages</p>
<div class = "quickfact1" id = "quickfact1">
<button class = "quickfact_button_1" id = "quickfact_button_1" onclick = "toggle1()" >Quick fact 1</button>
<div class = "quickfact_container_1" id = "quickfact_container_1" >
<p>
The unclassified Busuu language, spoken in the Southern Bantoid of Cameroon, is <strong>spoken by only eight people!</strong> At least it was in 1986. By 2005, only three people spoke Busuu, making it an endangered language.
</p>
</div>
<div class = "quickfact2" id = "quickfact2">
<button class = "quickfact_button_2"
id = "quickfact_button_2"
onclick = "toggle2()" >Quick fact 2</button>
<div class = "quickfact_container_2"
id = "quickfact_container_2" >
<p>fact number 2</p>
</div>
</div>
<div class = "quickfact3" id = "quickfact3">
<button class = "quickfact_button_3" id = "quickfact_button_3" onclick = "toggle3()" >Quick fact 3</button>
<div class = "quickfact_container_3" id = "quickfact_container_3" >
<p>
fact number 3
</p>
</div>
</div>
<div class = "quickfact4" id = "quickfact4">
<button class = "quickfact_button_4" id = "quickfact_button_4" onclick = "toggle4()" >Quick fact 4</button>
<div class = "quickfact_container_4" id = "quickfact_container_4" >
<p>
fact number 4
</p>
</div>
</div>
</div>
<footer>
<a href = "google" class = "footerLI">bla</a>
<a href = "google"class = "footerLI">bla</a>
<a href = "google" class = "footerLI">bla</a>
<a href = "google" class = "footerLI">bla</a>
<a href = "google" class = "footerLI">bla</a>
</footer>
</section>
<script src="script.js"> </script>
</body>
</html>
CSS
* {
margin: 0px;
font-family: sans-serif;
}
@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Yesteryear&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Just+Another+Hand&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Indie+Flower&family=Yesteryear&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Gloria+Hallelujah&family=Just+Another+Hand&display=swap")
body {
margin-right: 50px;
background-color: rgb(192, 194, 197);
width: 100%;
overflow-x: hidden;
}
.james_joyce_container,
.natalie_portman_container,
.jrr_tolkien_container,
.shakira_container {
display: flex;
gap: 40px;
margin-bottom: 80px;
color: rgb(70, 69, 69);
/*border: solid 6px rgba(5, 90, 164, 0.9)*/
/*width: fit-content;*/
/*block-size: fit-content;*/
margin-left: 100px;
margin-right: 150px;
/*background-color: rgb(198, 223, 249);*/
padding: 20px;
height: 250px;
width: 900px;
}
.james_joyce_biography,
.natalie_portman_biography,
.jrr_tolkien_biography,
.shakira_biography {
font-size: 19px;
}
/*
.james_joyce_button {
background-image: url(Images/jamesjoyce.jpg);
}
.natalie_portman_button {
background-image: url(Images/natalie_portman.jpg);
}
.jrr_tolkien_button {
background-image: url(Images/jrr_Tolkien.png);
}
.shakira_button {
background-image: url(Images/shakira.jpg);
}*/
h1 {
color: rgb(6, 6, 6);
font-size: 80px;
text-shadow: 4px 4px 1px rgb(76, 75, 75);
position: fixed;
left: 0;
right: 0;
-webkit-text-stroke: 0.01px;
-webkit-text-stroke-color: rgb(249, 161, 9);
}
header {
height: 120px;
width: 100vw;
background-color: rgba(140, 139, 139, 40%);
position: fixed;
padding: 15px;
text-align: center;
}
ul {
list-style: none;
}
.intro_text {
color: rgb(70, 69, 69);
margin-left: 55px;
margin-right: 400px;
margin-top: 200px;
margin-bottom: 50px;
font-size: 22px;
padding: 50px;
}
a {
color: rgb(19, 19, 18);
font-size: larger;
}
.quicklinks {
color: rgb(14, 14, 14);
font-size: 20px;
font-weight: bold;
font-weight: 30em;
margin-top: 30px;
}
.nav_plus_bios {
display: flex;
margin-top: 0px;
}
.main_section_excl_nav {
margin-right: -70px;
margin-top: 0px;
}
li {
padding-top: 20px;
padding-left: 0px;
padding-right: 80px;
}
footer {
margin-top: 150px;
height: 100px;
/*background-color: rgb(32, 2, 139);*/
width: 100vw;
margin-right: 0px;
}
a:hover {
color: black;
background-color: yellow;
}
a:visited {
color: grey;
}
.navbar {
margin-top: 200px;
}
/*.james_joyce_button {
margin-left: 50px;
display: block;
background: linear-gradient(90deg, hsl(240, 1%, 33%), #dbe1e1);
letter-spacing: 2px;
border-radius: 50px;
transition: ease-out 0.3s;
text-decoration: underline;
width: 100px;
height: 100px;
}*/
.footerLI {
color: rgb(235, 84, 9);
width: 100%;
display: inline;
margin-left: 100px;
}
.footerLI:first-child {
margin-left: 500px;
}
.quickfact_container_1,
.quickfact_container_2,
.quickfact_container_3,
.quickfact_container_4 {
display: none;
border-radius: 30px;
height: fit-content;
}
.james_joyce_container,
.natalie_portman_container,
.jrr_tolkien_container,
.shakira_container {
border-radius: 30px;
height: fit-content;
}
/*.jj_image_container {
position: relative;
align-items: normal;
}*/
img {
border-radius: 30px;
}
.quickfacts {
margin-left: 1200px;
margin-top: -1650px;
width: 200px;
text-align: center;
}
.quickfact_container_1,
.quickfact_container_2,
.quickfact_container_3,
.quickfact_container_4 {
margin-bottom: 30px;
border-radius: 30px;
background-color: aqua;
height: fit-content;
padding: 10px;
text-align: left;
}
.quickfact_button_1,
.quickfact_button_2,
.quickfact_button_3,
.quickfact_button_4 {
margin-bottom: 50px;
border-radius: 30px;
}
.quickfact1 {
margin-top: 30px;
}
/*.bio_container_hover:hover {
background-color: rgba(140, 139, 139, 40%);
color: black;
visibility: visible;
}*/
button:hover {
background-color: yellow;
}
Script
let quickfactContainer1 = document.getElementById(
"quickfact_container_1"
); /*.innerText*/
let quickfactButton1 = document.getElementById("quickfact_button_1");
function toggle1() {
if (quickfactContainer1.style.display === "none") {
quickfactContainer1.style.display = "flex";
quickfactButton1.style.display = "none";
} else {
quickfactContainer1.style.display = "none";
}
let quickfactContainer2 = document.getElementById(
"quickfact_container_2"
); /*..................innerText........*/
let quickfactButton2 = document.getElementById("quickfact_button_2");
function toggle2() {
if (quickfactContainer2.style.display === "none") {
quickfactContainer2.style.display = "flex";
quickfactButton2.style.display = "none";
} else {
quickfactContainer2.style.display = "none";
}
}
/*function toggle() {
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
this ONE WORKS*/
let jamesJoyceContainer = getElementById("james_joyce_container");
function toggle4() {
if ((jamesJoyceContainer.display = "hidden")) {
jamesJoyceContainer.display = "flex";
} else {
jamesJoyceContainer = "hidden";
}
}
}