could you maybe explain how adding a background to a popup works? i've tried multiple times and i failed every time :/
happy free-for-all friday! send me your photoshop or code questions and i’ll answer them!
certainly, anon! i would love to. here’s a method you can use if you’d like all your pop-ups to have the same background:
if you’re working from the pop-up pages code i’ve seen around on tumblr, you probably have a thing like this in your code:
.popup_block{ display:none; float:left; position:fixed; top:50%;left:50%; z-index: 99998;}
right? that’s the popup_block class.
you might have noticed that in the html that comes with the pop-up code, the div for the pop-up itself is written something like this:
class="popup_block">YOURCONTENT
see that class=“popup_block” bit? that refers to the popup_block class in your css! and whatever you change under .popup_block will be applied to every div you create with that class. all you have to do to add a background to a popup is this:
.popup_block{ display:none; float:left; position:fixed; top:50%;left:50%; z-index: 99998; background-image:url(YOURURLHERE);}
and all of your pop-up pages will display with the same background!
if you want one or all of your pop-up pages to have different backgrounds, that’s when you have to look at the box’s ID.
let’s take another look at the html:
id="02" class="popup_block">YOURCONTENT
see that id=“02″? as the instructions for your pop-up code should tell you, each box needs to have a different ID, which the link itself will target when you click it. since each box has to have a different ID, you can target that ID in the css, the same way you did the class!
it would look something like this:
#02 { background-image:url(YOURURLHERE);}
i hope this was helpful! please let me know if there’s anything else i can do for you <3