codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Follow publication

Let’s make a website. Episode VII — Let’s make a Pokédex!

Yanis Vieilly
codeburst
Published in
14 min readMar 12, 2018

--

POKEBALL, GO!

The box model

Drew this in Paint, with a trackpad. This is a literal masterpiece.

The content

The border

The padding

The margin

Haha, yeah! Totally! Ha! …Alright I didn’t get a single thing of what you just said.

La Joconde’s box model. Note that there’s no padding, since there’s no space between the painting itself and its frame.

Designing a box

p {
border: 1px solid black;
}
The greatest (…aaaand I just lost 12 Megadeth fans).
p {
border: 1px solid black;
padding: 10px;
}
p {
border: 1px solid black;
margin: 10px;
padding: 10px;
}
If you haven’t seen 300 yet, what are you waiting for? Stop reading this terrible blog and do it now.

Display

block

Some famous blocks.

inline

inline-block

Ballmer Peak, from xkcd
p {
display: inline-block;
}
Oh look, it’s that time of the year again where I can’t find any images related to this part, so I post a cute animal picture instead! This time, it’s a Siberian Husky.

<div> and <span>

What are they?

Some <div> and <span> found in the wild.
<div>
<p>Paragraph #1</p>
<p>Paragraph #2</p>
</div>
<div>
<p>Paragraph #3</p>
<p>Paragraph #4</p>
</div>

Wait but you talked about some <span> thing earlier

Yes you are!
Alexandri Macedonis.

THE POKÉDEX YES I’M EXCITED

What’s this?

Pikachu, the most famous Pokémon.
This is a Pokédex.

Our project today

Don’t worry. Once we’ll have finished, it’s actually gonna look good.

Title and columns

h1{
text-align: center;
}
div {
border: 2px solid green;
}
There could have been no better actor for Snape.

Classes

<div class="green"></div>
<div class="green"></div>
<p class="green"></div>
<div class="green"></div>
.green {
border: 1px solid green;
}
Green?
<div class="green nice-font"></div>
.green.nice-font {
border: 1px solid green;
font-family: Verdana;
}

Back to the good stuff

A cult classic.

Three colored columns

The cells

The Pokémon images

Descriptions

You can hear the theme in your head!

Conclusion

It’s a long way to the top (if you wanna rock ’n’ roll)

How about a contest?

It’s true!

What’s next?

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Written by Yanis Vieilly

Web developer | Explorer | Something cool with -er

Responses (3)

Write a response