Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html lang="fi">

<head>
    <title>Sami</title>
    <link rel="stylesheet" type="text/css" href="styles/layout.css" />
    <link href="https://fonts.googleapis.com/css2?family=Alata&display=swap" rel="stylesheet" type='text/css'>
    <script src="https://kit.fontawesome.com/a076d05399.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="utf-8" />
</head>

<body>

    <article class="page">
        <header>
            <h2 class="title">Sami</h2>
        </header>
        <nav style="text-align: center">
            <i class="fas fa-home"></i>
            <a href="index.html">Etusivu</a> <a>|</a>
            <i class="fas fa-pencil-alt"></i>
            <a href="harrastukset.html">Harrastukset</a> <a>|</a>
            <i class="fas fa-book"></i>
            <a href="portfolio.html">Portfolio</a>
        </nav>
        <section>
            <section class="content_left" id="content_left">
                <h1 class="fas fa-camera-retro"> Harrastukset</h1>
                <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed posuere interdum sem. Quisque ligula eros ullamcorper quis, lacinia quis facilisis sed sapien.</p>
                <h2 class="fas fa-pencil-alt"> Piirtäminen</h2>
                <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed posuere interdum sem. Quisque ligula eros ullamcorper quis, lacinia quis facilisis sed sapien.</p>

                <p>Mauris sed libero. Suspendisse facilisis nulla in lacinia laoreet, lorem velit accumsan velit vel mattis libero nisl et sem. Proin interdum maecenas massa turpis sagittis in, interdum non lobortis vitae massa.</p>
            </section>
            <section class="content_right" id="content_right">
                <h2 class="fas fa-laptop"> Tietokoneet</h2>
                <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed posuere interdum sem. Quisque ligula eros ullamcorper quis, lacinia quis facilisis sed sapien.</p>

                <img class="kuva" src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Desktop_computer_clipart_-_Yellow_theme.svg/1200px-Desktop_computer_clipart_-_Yellow_theme.svg.png" alt="Computer" width="440" height="370">
                <p>Kuva: Pöytäkone ja näyttö</p>
            </section>
        </section>
        <div class="footer">
            <p>Tekijä: Sami | 2020</p>
        </div>
    </article>
    <div class="clear"></div>
</body></html>

              
            
!

CSS

              
                /* layout.css */
body {
    background-color: #D8CCAF;
    font-size: 16px;
}

* {
    box-sizing: border-box;
}

.row::after {
    content: "";
    clear: both;
    display: table;
}

.title {
    font-size: 250%;
    margin-top: 0px;
    color: white;
    position: sticky;
    text-align: center;
    top: 100px;
}

[class*="col-"] {
    float: left;
    padding: 15px;
}

.header {
    background-color: #9933cc;
    color: black;
    padding: 15px;
}

.aside {
    background-color: #33b5e5;
    padding: 15px;
    color: #ffffff;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.footer {
    background-color: #E49A2F;
    color: #000000;
    text-align: center;
    font-size: 26px;
    padding: -1px;
}

/* For mobile phones: */
[class*="col-"] {
    width: 100%;
}

p.a {
    font-family: 'Alata', sans-serif;
}

p {
    color: black;
    font-size: 60%;
}

h1 {
    color: black;
    font-size: 110%;
}

h2 {
    color: black;
    font-size: 80%;
}

a {
    color: white;
    float: center;
}

/* Sivuston skaalaus ei toimi.*/
article.page {
    width: 1080px;
    margin-top: 0px;
    margin-bottom: 0px;
    margin-left: auto;
    margin-right: auto;
    background-color: #D8CCAF;
    display: flex;
    flex-direction: column;
}

.InsideContent {
    display: inline-block;
}

header {
    width: 1080px;
    height: 90px;
    margin-bottom: 0px;
    background-color: #575757;
    color: #F0EBEB;
    font-size: 100%;
}

nav,
footer {
    width: 1080px;
    height: 30px;
    background-color: #E49A2F;
    overflow: auto;
}

section {
    padding: 1.5%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    float: left;
    width: 1080px;
    height: 600px;
    padding: 1.5%;
    float: left;
    background-color: #D8CCAF;
}

section.content_left {
    flex-grow: 1;
    margin: 1.5%;
    width: 450px;
    height: 520px;
    float: left;
    background-color: #F7F5EE;
    border: 1px;
    padding: 10px;
    border-radius: 25px;
    border-color: #AC9675;
    font-size: 200%;
    display: inline-block;
}

section.content_right {
    flex-grow: 1;
    margin: 1.5%;
    width: 450px;
    height: 560px;
    float: right;
    background-color: #F7F5EE;
    border: 1px;
    padding: 10px;
    border-radius: 25px;
    border-color: #AC9675;
    font-size: 200%;
    display: inline-block;
}

.tabletti {
    text-align: center;
    /* linkkien keskitys */
}

.tabletti a {
    display: inline-block;
    color: ##D8CCAF;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
    background-color: ##D8CCAF;
    color: black;
}

.tabletti {
    background-color: ##D8CCAF;
    color: black;
}

.tabletti a:hover {
    background-color: ##D8CCAF;
    color: black;
}

.tabletti {
    display: none;
    /* piilotetaan tabletti */
}

@viewport {
    zoom: 1.0;
    width: extend-to-zoom;
}

@-ms-viewport {
    width: extend-to-zoom;
    zoom: 1.0;
}

/* For desktop-PC: */
@media screen and (max-width:900px) {

    nav,
    footer,
    section.content_left,
    section.content_right {
        width: 100%;
    }

    .left,
    .main,
    .right {
        width: 100%;
        /* The width is 100%, when the viewport is 800px or smaller */
    }

    h1 {
        font-size: 35px;
        /* fontin koko */
    }

    h2 {
        font-size: 25px;
    }

    margin-left: 40px;

}

/* Media Queries: Tabled Portrait */
@media screen and (max-width:480px) {
    .tabletti {
        display: block;
    }

    nav,
    footer,
    section.content_left,
    section.content_right {
        width: 100%;
        font-size: 16px;
    }

    /* tablettinäkymä näkyviin */
    .mobiili {
        display: none;
    }

    /* piilotetaan alasvetovalikko */
    h1 {
        font-size: 36px;
        /* fontin koko */
    }

    h2 {
        font-size: 26px;
    }

    .content {
        padding: 10px;
        width: 90%;
    }

    .content_left {
        padding: 10px;
        width: 90%;
        margin-left: auto;
    }

    .content_right {
        padding: 10px;
        width: 90%;
        margin-right: auto;
    }

    display: inline-block;
    width: 45%;
}

/* For mobile phones: */
@media only screen and (max-width:250px) {

    nav,
    footer,
    section.content_left,
    section.content_right {
        width: 100%;
    }

}

img {
    max-width: 100%;
    height: auto;
}

.kuva {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.clear {
    clear: both;
}

.clearfix {
    overflow: auto;
}

@media (max-width: 400px) {
    .content {
        flex-direction: column;
    }
}

              
            
!

JS

              
                
              
            
!
999px

Console