The links located beneath the iframe/span element are unclickable

My latest creation is a static advert ticker positioned at the bottom of the window. It's contained within an <iframe> for easy placement on other websites. I added a <span> around the <iframe> to keep it fixed at the bottom of the screen. The script includes a help window enclosed in a tag inside the <iframe>, using the visible/hidden property to toggle text display.

However, there's a slight issue because the help text does not appear on the main window since it's within an <iframe>. To work around this, I enlarged the size of the <iframe> and set it to transparent.

Everything looks good visually, except for the fact that links underneath the <span><iframe> section cannot be clicked. I attempted to use CSS pointer-events without success, as the links within the <iframe> must remain clickable as well.

I'm unsure whether the issue stems from the <iframe> itself or the surrounding tag. Could it possibly be a security measure to prevent "clickjacking" or is there a solution available?

If necessary, I could shrink the <iframe> and utilize a JavaScript pop-up window to display the help text, although these windows tend to display the URL and status windows, which isn't ideal!

For reference, here's the code snippet:

 <span style="position:fixed;bottom:10px;display:inline;width:100%">
 <center>
 <iframe src="http://www.xxx.com/cgi-bin/ticker/run_tick.pl?s=xzy" frameborder=0 align=top width=800px height=330px marginwidth=0 marginheight=0 hspace=0 vspace=0  scrolling=no allowtransparency=true></iframe>
 </center>
 </span>

Answer №1

Adjust the height of the span equal to that of the iframe (330px)

Please update me on your progress

Answer №2

Wow, I had quite the adventure getting this to function properly!! (Spent twelve hours on Wednesday the 23rd, and about three hours today)

Originally, I had an <iframe> that took up almost 75% of the screen space, in order to show the help window to users within the page rather than using a modal popup. However, due to security concerns, browsers would not allow clicking through the text that covered links beneath.

I needed to completely revamp the entire layout.

Now, the help file is contained within a separate <span> window that stays hidden until the user needs it. But even then, there was still the issue with the ticker code at the bottom.

I had to split it into three <divs>, one on each side of the main ticker. Yet again, the side ones were blocking the content underneath, so I had to set both <divs> to have "pointer-events:none", meaning they were not clickable and mouse events could pass through to the content below. The middle section for the ticker was set to the opposite, "pointer-events:auto", allowing clicks on the top window while ignoring the bottom page.

Another challenge: Because the ticker displays graphics that overlap the main text, there was a half-inch area where clicking on the main page was impossible. A solution was found by adding another span in the code that covered the region with a transparent GIF. When the user hovers over this graphic, it swaps to display a semi-transparent checkerboard, directing them to read more in the help file.

Lastly, when the user clicks the minimize button, the <div> holding the ticker code is hidden (allowing access to all links on the page) and ANOTHER <div> shows a "Restore" image. Clicking on this hide the graphic, revealing the main ticker window and the two side <divs>.

And to think it was supposed to be just a simple script! (Oh, and feel free to check out my website or blog, but note that I won't be uploading these changes until late on Saturday the 26th)

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Adjusting value of one input field according to the content of another text field in an

Just starting out with Angular and I am looking to dynamically change the value of a hidden input field called 'cc_card' based on the first digit entered in another input field called 'cc_number'. For example, if the user enters 5 in &a ...

What could be causing my elements to shift out of place?

Here is the box I created: BOX Now, I want to position another box near the input of the BET box. <div id="x2"></div> <!-- HTML ---> /* CSS */ #x2{ width: 40px; height: 40px; background: cornflowerblue; } The layout after ...

Passing string values to an onClick event listener in Javascript is similar to how it is done in an onclick event listener in HTML

render() { return ( <div> <div onClick={() => "FSR.launchFeedback('ax9sgJjdSncZWoES6pew6wMIyCgSXpC')" } /> </div> ); } This piece of code initially appear ...

What would be the best way to create a JavaScript function that emulates the functionality of an Upgrade Button?

I am currently working on developing a clicker game and have reached the point where I need to implement a function for the 'upgrade click' button. This function should deduct a certain amount of money when clicked, while also increasing the amou ...

The process of HTML compilation is halted due to the unexpected presence of the forbidden 'null' data type, despite the fact that null cannot actually be a valid value in

Encountering an issue with my HTML code, where the compiler stops at: Type 'CustomItem[] | null | undefined' is not compatible with type 'CustomItem[] | undefined'. Type 'null' cannot be assigned to type 'CustomItem[] ...

observing which specific element corresponds to the nth child?

Exploring the concept illustrated in https://api.jquery.com/eq/, imagine a scenario with the following HTML structure: <ul> <li>list item 1</li> <li>list item 2</li> <li>list item 3</li> <li>list item ...

Seeking a template for a server-side programmer who lacks proficiency in CSS and design?

Hey there all you wise folks! So here's the deal - I'm a PHP/JavaScript wizard when it comes to logic and server-side stuff, but I really suck at design, CSS, and all things arty. Does anyone have any recommendations for a template or tool that ...

Exploring Django's HTML QuerySet

Is there a way to verify if a student exists in the database class table, given that the student is assigned as a foreign key in the table? I am looking to achieve this without opening another loop. index.html: <ul> {% for student in studentList %} ...

How can you achieve the effect of "hovering over an image to automatically start playing a muted video within the image itself"?

[![enter image description here][1]][1]I am working with WordPress and Elementor, and I want to create a hover effect where an image triggers a muted video to play within the image area on mouseover. The video should stop playing when the mouse is not hove ...

I am dynamically generating table rows and populating them with data. However, I encountered an issue with retrieving the data by their respective IDs

Creating a table row dynamically by populating it with data. However, encountering an issue with retrieving the data by their respective id. if(xmlhttp.status == 200) { var adminList = xmlhttp.responseJ ...

Embed a javascript tag to print a PDF document

I have been struggling with printing a PDF file using JavaScript. I attempted to use the embed trick suggested in this Silent print a embedded PDF but unfortunately, the print function remained undefined. Then, I tried another approach using an Iframe and ...

Should I open the Intel XDK hyperlinks in the default web browser instead of

Lately, I've been developing an HTML5 app on the Intel XDK that includes buttons linking to external websites. However, I'm encountering an issue where the apps open in the same window, leading users to get stuck in the browser. Currently, I am u ...

Having trouble with the fancybox form

Take a look at this link for information on how to display a login form. Once you click on "Try now", follow these steps: A fancy box should open with fields for name and password. If both fields are left blank and the login button is clicked, an error ...

Immediate family members nearby are not an option. We will have to create the form dynamically

On a previous page, there is a form that allows users to input data and define the number of "Attributes" they want to assign to a device by clicking on a button. Users are prompted to specify a name and type for each attribute. If the user selects "Selec ...

Struggling with this CSS is really getting to me

I am struggling to create a modal with the tools and close button appearing on the same line. It should look similar to the image below: var modal = document.getElementById('myModal'); var btn = document.getElementById("myBtn"); var span = doc ...

Highlighting menu elements when landing on a page and making another menu element bold upon clicking in WordPress

I've been searching extensively for a solution to this issue. I'm trying to make the menu item DE appear bold when entering the site, and if I click on EN, I want DE to return to normal (thin) font while EN becomes bold. You can find the site he ...

Animating content through CSS and jQuery to reveal its unfolding effect

Just stumbled upon the amazing quote-expansion animation in the OSX Mail app and I am completely impressed. I am on a mission to bring that same magic to the web (or at least close to it), but unsure if anyone has done something similar yet. A couple of ...

What is causing the border-radius property to malfunction on a particular website when using Internet Explorer?

We create browser add-ons for popular browsers like Google Chrome, Firefox, Safari, and Internet Explorer. Our add-ons inject HTML elements into various websites such as mail.google.com and email14.secureserver.net. The HTML element we use has a border-ra ...

"Utilizing Bootstrap to add borders to div elements is a

https://i.sstatic.net/yPt46.png Hey there! I am working on a project using bootstrap 4. I encountered an issue that I can't seem to solve. I placed an image inside a div, set the div's height and width to 200px with overflow hidden. The image w ...

Generate an image, PDF, or screenshot of a webpage with the click of a button

I've been searching for a solution that would enable users to click a button and save an image or PDF of the current page. The content on the page is dynamic and dependent on user input, resulting in sequences displayed in various colors. I'm loo ...