How to put popup notification on site?

HTML

Title /title

Head
Code as you no
/Head

Body

Add other div as you no

/body

/html

Save as test.html see what happens
 
HTML

Title /title

Head
Code as you no
/Head

Body

Add other div as you no

/body

/html

Save as test.html see what happens

Doesn't work, nothing happens.

I can't save as test.html, I'm trying it on a live page index.php
 
Well, this is just ridiculous. I can't believe I'm so stuck on something that should be so simple.

If this was blogger/blogspot I'd have made a working popup in 5 minutes.

What I hate about the internet is that no one can keep it simple. Google on how to make a sandwitch, you won't find a tutorial that says to take 2 slices of bread, put some cheese on one of the slices, and put the other slice on top of it. You won't find that tutorial. And those are the types of tutorials I always need :D
 
Well I managed to add a popup successfully, following this - https://stackoverflow.com/questions/19707236/show-popup-after-page-load

But I can't align the fucker right, can't center it. On desktop it's a bit to the left, on mobile it's a bit to the right. If I center it on desktop by playing with top/left in CSS, then it goes even more to the right on mobile and doesn't look good.
 
Check out sweetAlert. Very easy to use.
 
What i did for you,to get it work..

https://www.codepile.net/pile/Eq5Zzbkm
same page i used online lol,just altered.

Thanks man, but I already managed to put something functional in place.

Here:

qqq.JPG


But of course now I have 2 other problems.

1) The width and height are set in px, and I don't feel comfortable with that. But if I try to add 100% or auto, the box just expands too much.

2) Using the top and left CSS commands I managed to center the box, at least for the dimensions my lap top uses. But on mobile the box is all the way to the right of the page. I tried doing 100% and auto on top and left, and even removing top and left commands from the CSS, but then the box just moves wherever it wants.

So I gotta try and fix these.
 
Well, this is just ridiculous. I can't believe I'm so stuck on something that should be so simple.

If this was blogger/blogspot I'd have made a working popup in 5 minutes.

What I hate about the internet is that no one can keep it simple. Google on how to make a sandwitch, you won't find a tutorial that says to take 2 slices of bread, put some cheese on one of the slices, and put the other slice on top of it. You won't find that tutorial. And those are the types of tutorials I always need :D
Man Wordpress spoiled me. 10 years ago I would have been able to do this in my sleep. Now I honestly can't remember if you need a flex or fixed, Or if you should container your container. If you're getting white pages your close button is probably attached to the body btw, and not the container you want it to be. That's probably about as useful as Im going to be :\. Look around for dynamically centered or something like that.
 
Man Wordpress spoiled me. 10 years ago I would have been able to do this in my sleep. Now I honestly can't remember if you need a flex or fixed, Or if you should container your container. If you're getting white pages your close button is probably attached to the body btw, and not the container you want it to be. That's probably about as useful as Im going to be :\. Look around for dynamically centered or something like that.

I got it going bro. It's not perfect, but works good enough. I'll fix the minor issues and then roll it out to my entire site.

Cheers :)
 
Well, I guess we're done here.

The popup box is up and running, and all the little alignment and font size issues are fixed, looking good both on mobile and desktop.

The CSS issues I had are mentioned here - https://www.blackhatworld.com/seo/css-help-centering-popup-box.1297387/

Thanks all for the company and the help.

Now to figure out what exactly to write in my popup box for my visitors, and then to implement the box on all the pages on the site. Drone work go! :p

Okay, song... im hooked on everlast the past couple of days... he's the whitest black man that has ever lived... or the blackest white man that has ever lived... oh whatever :D

 
Hi

Can you share your code please?
This is actually quite easy to implement and you don't even need jQuery for this, you can do it with Vanilla JS only.

Thanks man, but there's no need, I took care of this already :)
 
Back
Top