Create a Simple Popup Modal

RichardCodes · 336K views · 2018 · 19:25

Open on YouTube

Web developmentUX & UI designtutorial

Why Stack Overflow recommends it

Stack Overflow users link it as the reference tutorial they followed when building a modal popup, usually when asking why their own version of the code doesn't work.

Recommended by 0 people across 0 different months, 2019 to 2020.

What it is

A roughly 19-minute tutorial by RichardCodes that builds a simple modal popup form with plain HTML, CSS and JavaScript. The popup appears when a button is clicked, and the description links to starter and finished CodePen projects.

What people said

Cites TTA1EE · 2019-04 · Stack Overflow · on “Mistakes with Modal Pop up (display:none function in js)”

I'm setting up a new personal website. .Modal Pop up onclick on image, the modal pop up have to change the proprieties from display:none to display:flex. I've modify my codes structure, in something like this: [this video] but still don't work. Here's a link to a CodePen CODEPEN [LINK] : [LINK] document.getElementById('Avatar15').addEventListener("click", function() { document.querySelector('.bg-modal').style.display = "flex"; }); document.querySelector('.close').addEventListener("click", function() { document.querySelector('.bg-modal').style.display = "none"; });

Cites Kenser Nut · 2020-02 · Stack Overflow · on “How do you create a modal in electron js? (javascript, html, css)”

Rather, I need help in creating a modal. Use this video for reference: [this video] I followed this tutorial but I can't make my button work. I do not know what is the problem and it is driving me crazy. enter image description here [LINK] Do I need to put his javascript code in a particular location as for electron projects? Help Javascript const { app, BrowserWindow, Menu} = require('electron') const path=require('path') const url=require('url') function createWindow () { // Create the browser window. const mainWin = new BrowserWindow({ width: 800, height: 600, resizable:false, webPreferences: { nodeIntegration: true } }) // and load the index.html of the app. mainWin.loadFile('index.html') //

Cites Lionel · 2020-08 · Stack Overflow · on “How do I prevent the android keyboard push my container up?”

So I'm doing a website with a "Modal Popup" [this video] login form responsive to mobile first and I have a footer to the end of the modal container. The problem is when I want to write something in both inputs, the keyboard appears and it push the footer up. I want the footer to stay in the position and the keyboard just don't resize my modal container or have interaction with the website. This is how it look without showing the keyboard [LINK] And this is when it push the footer up. [LINK] Here's the code. * { margin:0; padding:0; } header{ background-color:red; width:100%; height:30px; display:flex; justify-content: center; align-items: center; } .to-modal-container{ background-color:blue; wid

Critical Kenser Nut · 2020-02 · Stack Overflow · on “Is putting a modal in javascript html css the same as in electron js?”

Oof did not really work. I followed this video but the javascript part did not work for me. Either it did not realize document.querySelector or when it has no errors, then it won't work anyways [this video]