Iframe causing problems with css popup

djadler2001

New Member
I'm fairly new to web development and am self taught on everything I do. I have an iframe in which I have a page that has a css & javascript popup called by jquery. What should happen is when a link is pressed, before going to the next page, it shows up in a popup window with a shaded out background. This is my javascript code:\[code\]$SearchListings.on("click", "a", function (e) { e.preventDefault(); href = http://stackoverflow.com/questions/15663102/e.target.href; itemnum = getItemNum(href); var dataString = //urlhere $.get(dataString, function (data) { $linkShade.fadeIn(); $linkModal.html(data).delay(500).fadeIn(); Galleria.loadTheme('js/galleria.classic.min.js'); $('#galleria').galleria({ lightbox: true }); }); }); $linkShade.on("click", closeModal); $linkModal.on("click", ".modalCancel", closeModal); $linkModal.on("click", ".modalBtn", function (e) { e.target.href = http://stackoverflow.com/questions/15663102/href; });`\[/code\]and this is the css involved\[code\]#linkModal {background: white;border: 10px solid black;bottom: 0;color: black;display: none;font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;height: 700px;left: 0;margin: auto;position: fixed;right: 0;top: 0;width: 800px;overflow: scroll;}\[/code\]My question is how can I get the pop up to show up and be centered to the screen where the user's location on the page not just centered in the iframe. I'm sorry if this is poorly explained. This is my very first post ever. Mostly I come here and find my answer and have never needed to post anything. Please help if you can. Thanks!EDIT #1:Here is the jsfiddle
 
Back
Top