Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 52 additions & 29 deletions zoo-css-challenge/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<main>
<section class="introduction">
<h1>Birmingham Zoo</h1>
<p>‘The zoo is open every day of the year and features three major biomes: the Tropic Zone, Temperate Territory, and the Polar Circle. From tropical birds, to snow leopards, grizzly bears, and one of the nation’s largest colonies of Antarctic penguins, there are animals to enjoy in every season.’</p>
</section>

<div id="badge">
Expand All @@ -35,37 +36,39 @@ <h2>Bears</h2>
src="https://placebear.com/200/300"
alt="Grizzly Bear"
width="200"
height="300"
height="400"
>
<img src="https://placebear.com/400/300"
alt="Grizzly Bear"
width="400"
height="300"
height="400"

>
<img src="https://placebear.com/200/400"
alt="Grizzly Bear"
width="200"
height="400"

>
</div>
</section>

<section class="tigers">
<h2>Tiger</h2>
<h3>Top 5 Tiger Facts</h3>
<ol>
<h2>Tiger Facts’</h2>

<ul>
<li>Tigers are the largest cat species in the world reaching up to 3.3 meters in length and weighing up to 670 pounds!
<li>Tigers are easily recognizable with their dark vertical stripes and reddish/orange fur.
<li>The Bengal tiger is the most common tiger.
<li>Tigers live between 20-26 years in the wild.
<li>Unlike most other cats, tigers are great swimmers and actually like the water.
</ol>
</ul>
</section>

<section class="giraffe">
<h2>Giraffe</h2>

<p>Giraffes are the world's tallest mammals, thanks to their towering legs and long necks. A giraffe's legs alone are taller than many humans—about 6 feet . These long legs allow giraffes to run as fast as 35 miles an hour over short distances and cruise comfortably at 10 miles an hour over longer distances.</p>
<p><strong>Giraffes are the world's tallest mammals, thanks to their towering legs and long necks. A giraffe's legs alone are taller than many humans—about 6 feet . These long legs allow giraffes to run as fast as 35 miles an hour over short distances and cruise comfortably at 10 miles an hour over longer distances.</strong></p>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<p><strong>Giraffes are the world's tallest mammals, thanks to their towering legs and long necks. A giraffe's legs alone are taller than many humans—about 6 feet . These long legs allow giraffes to run as fast as 35 miles an hour over short distances and cruise comfortably at 10 miles an hour over longer distances.</strong></p>
<p>Giraffes are the world's tallest mammals, thanks to their towering legs and long necks. A giraffe's legs alone are taller than many humans—about 6 feet . These long legs allow giraffes to run as fast as 35 miles an hour over short distances and cruise comfortably at 10 miles an hour over longer distances.</p>

The task is to make the font size of this paragraph larger, which we can do with the CSS property font-size. <strong> makes the font bold, which is not related to font size.


<h3>Behavior</h3>

Expand All @@ -80,52 +83,72 @@ <h3>Height and Size</h3>

<section class="news">
<h2>News</h2>
<div class="card">
<div class="container">
<div class="box">

<time>2010-04-16</time>
<h4>Helping wild turtles in Seychelles</h4>
<h3>Helping wild turtles in Seychelles</h3>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<h3>Helping wild turtles in Seychelles</h3>
<h4>Helping wild turtles in Seychelles</h4>

We can change this back to h4 as there's no task to change the heading level

<a>Find out More</a>
<br>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<br>

It's not common to use <br> anymore in frontend development. Instead, we would add space using CSS margins

</div>
<div class="card">

<div class="box">
<time>2010-04-12</time>
<h4>Learning about the rainforest</h4>
<a>Find out More</a>
<a>Find out More</a><br>
</div>
<div class="box">
<time>2021-06-04</time>
<h5>‘Which big cat are you?’</h5>
<a>Find out More</a><br>
</div>
</div>
</section>

<section class="education">
<div class="education-container">
<h3>Learning resources for schools</h3>
<div class="container">
<h1>Learning resources for schools</h1>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<h1>Learning resources for schools</h1>
<h3>Learning resources for schools</h3>

We should change this back to h3 as the tasks don't mention changing the heading level

<p>Explore our activities, videos, and lesson plans to support a wide range of curriculum topics</p>
<button>Find them here</button>
<button id= "Find them here">Find them here</button>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<button id= "Find them here">Find them here</button>
<button id= "find-them-here">Find them here</button>

IDs and classes can't have spaces in them. Instead, normally we use dashes instead of spaces and make the text lowercase

</div>
</section>

<section class="membership">
<h2>Are there any benefits or discounts for members?</h2>
<p>There are <strong>AMAZING</strong> benefits of becoming a member with Birmingham Zoo! Our members get special discounts in our shops, cafes, and unlimited entry</p>
<button>Learn More</button>
<div id="container">
<button id="Learn More">Learn More</button>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<button id="Learn More">Learn More</button>
<button id="learn-more">Learn More</button>

Same as my other comment

</div>
</section>

<section class="programs">
<h2>Programs</h2>
<div class="card">
<h4>Children and Family Programs</h4>
<a>Find out More</a>
</div>
<div class="card">
<h4>Adult Programs</h4>
<a>Find out More</a>
</div>
<div class="card">
<h4>Youth and young adults</h4>
<a>Find out More</a>
<h2>Programs</h2>



<div class="container">
<div class="card">
<h3>Children and Family Programs</h3>
<a>Find out More</a>
</div>
<div class="card">
<h4>Adult Programs</h4>
<a>Find out More</a>
</div>
<div class="card">
<h5>Youth and young adults</h5>
<a>Find out More</a>
</div>
</div>


<h3>Useful Links</h3>
<p>
</p>
<a href="https://www.w3schools.com">w3schools.com</a>
<a href="https://www.w3schools.com" target="_blank">w3schools.com</a>
<a href="https://www.nationalgeographic.com/" target="_blank">National Geographic</a>
<a href="http://www.wikipedia.org" target="_top">Wikipedia</a>
<a href="http://www.wikipedia.org" target="_blank">Wikipedia</a>

</section>

</main>
Expand Down
123 changes: 85 additions & 38 deletions zoo-css-challenge/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
* {
font-family: sans-serif;



}

header {
Expand Down Expand Up @@ -30,7 +33,7 @@ section {
}

img {
border: 5px solid #8075ff;
border: 5px solid black;
}

h1,
Expand All @@ -40,31 +43,40 @@ h4,
h5 {
/*Purple*/
color: #6320ee;
margin-bottom: 1em;
margin-bottom: 10px;
}

h1 {
font-size: 250%;
font-size: 1rem;
}

h2 {
font-size: 175%;
font-size: 1rem;
color: rgb(209, 66, 22);
text-align: center;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These CSS properties change the style for all h2 elements on the page, but the tasks only want us to change the headings for specific sections. For example, the News heading should be centred, so we can use the selector news h2 instead to only select the h2 in the news section

}

h3 {
font-size: 150%;
font-size: 1rem;
color: rgb(235, 15, 206);
text-align: center;
}

button {
button:hover {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we change this from button to button:hover, it means we only show these button styles when we hover on a button which is not what we want. Instead, we can create a new rule button:hover and leave this button { alone

display: inline-block;
border-radius: 3px;
border-radius: 50%;
cursor: pointer;
padding: 10px 20px;
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2);
background-color: #372772;
border: 2px solid black;
color: #fff;
}
font-size: 1.25rem;
}
#container
{
text-align: center;
}

footer {
background-color: #211a1d;
Expand All @@ -85,7 +97,7 @@ footer {
border-radius: 50%;
display: inline-block;
position: fixed;
bottom: 20px;
top: 20px;
right: 20px;

display: flex;
Expand All @@ -105,50 +117,59 @@ footer {

.image-container img {
vertical-align: top;
border: 5px solid #747c92;
border: 5px solid #0041f5;
}

.image-container img:first-of-type {
vertical-align: bottom;
}

.image-container img:first-of-type {
vertical-align: bottom;
border-color: #ff3f00;
}

.image-container img:last-of-type {
vertical-align: bottom;
border-color: aqua;
}
.tigers {
background-color: #0b3c49;
color: #f0e100;
}

.giraffe {
background-color: #465775;
color: #56e39f;
background-color: #483C46;
color:#BEEE62;


}

.giraffe h2 {
color: #ef6f6c;
font-size: #F4743B;
}

.card {
display: inline-block;
background-color: white;
padding: 20px;
margin: 10px;
width: 30%;
.box>.container {
display: flex;
flex-direction: row;
background-color: rgb(15, 223, 136);
padding: 20px;
margin: 5px;
border: 1px solid black;
border-radius: 10px;

}

.card h4 {
margin-bottom: 1em;
}

.card a {
text-decoration: underline;
font-weight: bold;
}
.box {
text-align: center;
background-color: white;
padding: 20px;
margin: 5px;
width: 30%;
border: 1px solid black;
border-radius: 10px;

.card time {
opacity: 0.5;
display: inline-block;
margin-bottom: 10px;
}

/*Education*/
Expand All @@ -160,24 +181,30 @@ footer {
background-size: cover;
background-position: center;
padding: 100px 5%;
text-align: center;
}

.education-container {
background-color: rgba(255, 255, 255, 0.75);
.container {
background-color: rgba(20, 214, 62, 0.75);
padding: 50px;
max-width: 400px;
}

.education-container h3,
.education-container p {
text-align: center;
margin-bottom: 1em;
background-position: center;
width: 700px;
margin: 2rem auto;

}



/*Membership*/

.membership {
.membership p{
text-align: center;
background-color: #fffffc;
width: 700px;
margin: 2rem auto;
}

.membership h2 {
Expand All @@ -190,6 +217,26 @@ footer {

/*Programs*/

.programs .card {
.programs {

text-align: center;
}
.programs>.container {
display: flex;
flex-direction: row;
background-color: blue;
}
.card {
text-align: center;
display: block;
background-color: white;
padding: 20px;
margin: 5px;
width: 30%;
border: 1px solid black;
border-radius: 10px;
}