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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <title>Grafikart Challenge</title>
    <link rel="stylesheet" href="css/styles.css" />
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;900&display=swap" rel="stylesheet">
</head>
<body>
    <section class="main">
        <h1>Modifier mon profil</h1>
        <form class="form-profil">
            <div class="champ">
                <label for="nom">Nom</label>
                <input type="text" id="nom" />
            </div>
            <div class="champ">
                <label for="prenom">Prénom</label>
                <input type="text" id="prenom" />
            </div>
            <div class="champ champ-textarea">
                <label for="nom">Bio</label>
                <textarea id="bio" rows=5></textarea>
            </div>
            <div class="champ">
                <label for="email">Email</label>
                <input type="email" id="email" placeholder="monemail@demo.fr" />
            </div>
            <div class="champ">
                <label for="telephone">Téléphone (mobile)</label>
                <input type="text" id="telephone" />
            </div>
            <div class="champ">
                <label for="adresse">Adresse</label>
                <input type="text" id="adresse" />
            </div>
            <div class="champ">
                <label for="ville">Ville</label>
                <input type="text" id="ville" />
            </div>
            <div class="champ">
                <label for="codepostal">Code postal</label>
                <input type="text" id="codepostal" />
            </div>
            <div class="options">
                <div class="option">
                    <input type="checkbox" id="newsletter">
                    <label for="newsletter">Je souhaite recevoir la newsletter</label>
                </div>
                <div class="option">
                    <input type="checkbox" id="newsletter-partenaires">
                    <label for="newsletter-partenaires">Je souhaite recevoir la newsletter des partenaires</label>
                </div>
            </div>
            <input class="btn-save" type="submit" value="Enregister mes modifications" />
        </form>
    </section>
</body>
</html>
              
            
!

CSS

              
                .main {
  max-width: 1200px;
  margin: 0 auto;
}

.main h1 {
  margin-left: 20px;
  margin-right: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #D7DBDF;
  font: 600 24px roboto;
}

.main .form-profil {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.champ,
.options {
  margin-left: 20px;
  margin-right: 20px;
  margin-top: 20px;
}

.champ {
  display: flex;
  flex-direction: column;
}

.champ-textarea {
  grid-row-end: span 2;
}

.champ label {
  padding-bottom: 5px;
  font: 400 16px roboto;
}

.champ input,
.champ textarea {
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #D2D6DB;
  font: 400 16px roboto;
  border: 1px solid #D2D6DB;
}

.champ input:focus,
.champ textarea:focus {
  border: 1px solid rgb(81, 159, 255);
}


.options {
  grid-column-end: span 3;
  display: flex;
  margin-bottom: 20px;
}

.option {
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  margin-right: 15px;
}

.option input,
.option label {
  margin: 2px 5px;
}

.btn-save {
  grid-column-start: 3;
  width: 250px;
  justify-self: end;
  margin-right: 20px;
  font: 500 16px roboto;
  background-color: #5850EB;
  color: white;
  border-radius: 6px;
  padding: 15px;
}

@media(max-width: 900px) {
  .main .form-profil {
    grid-template-columns: repeat(2, 1fr);
  }
  .btn-save {
    grid-column-start: 2;
  }
  .options {
    grid-column-end: span 2;
  }
}

@media(max-width: 600px) {
  .main .form-profil {
    grid-template-columns: 1fr;
  }
  .btn-save {
    grid-column-start: 1;
  }
  .options {
    grid-column-end: span 1;
    flex-direction: column;
  }
  .option {
    justify-content: flex-start;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console