Placing one image over another to create a layered effect

I'm having some difficulty overlaying a logo on top of a background image. In my HTML code, the background image is continuously refreshed to appear like a video stream. The image, dublin-rememberance-floor2, is retrieved from a database using JavaScript and displayed in fullscreen. My logo, logo.svg, is supposed to sit in the top left corner, but it currently appears behind the background image. I've tried a few methods but haven't had any success.

    <body>
        <img class="fullBG" evercam='dublin-rememberance-floor2' refresh="1000" alt="" /> <div class="logo">
    <img height="25" src="http://www.evercam.io/img/logo.svg" border="0" width="175" alt="http://www.evercam.com/" />
</div>

width="175" alt="http://www.evercam.com/" />   
        <img />
        <script>
            $(document).ready(function () {

                Evercam.setApiUrl('http://api.evercam.io/v1');
            });
        </script>
    </body>

Here is my CSS for the fullBG and logo;

    .fullBG {

        position: absolute;
        top: 0px;
        left: 0px;
        overflow: auto;
        z-index: 1;
        width:100%;
        height:100%;                
    }
.logo{
    position: absolute;
   top: 0;
   right: 0;
}

Update: After making adjustments to my CSS, this configuration seemed to resolve the issue.

.fullBG {

        position: absolute;
        top: 0px;
        left: 0px;
        overflow: auto;        
        width:100%;
        height:100%;                
    }
.logo{
    position: absolute;
   top: 0;
   right: 0;
z-index: 1;
}

Answer №1

If you want to make the logo appear in front of the background, try assigning a higher z-index value to the logo compared to the background.

Answer №2

In my opinion, it would be beneficial to set the positioning of your logo's link as absolute. Additionally, there appears to be a lack of a distinct closing image tag in your code, and you are attempting to insert an "a href" within the images themselves.

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

A pop-up box appears when hovering over a radio button

There are three radio button options available: None Float Left Float Right When the user hovers over the radio button, I want to show a preview of the div. <asp:radiobuttonlist runat="server" id="rbl" repeatdirection="Horizontal"> <asp:li ...

Installing material-ui using npm does not always result in getting the most up-to-date version

I'm currently facing a dilemma with an abandoned project that serves as the admin tool for my current project. The Material-UI version used in this project is 0.19.4. However, when I remove the dependency from my package.json file and execute npm inst ...

What advantages does $sce or Strict Contextual Escaping provide in AngularJS, and why is it unnecessary for React?

I find it perplexing that I am unable to fully grasp the true value of utilizing SCE in AngularJS (even after reviewing the documentation) when it comes to security benefits. It leaves me wondering why React does not require SCE. So, to summarize my quest ...

This issue with ng-include not functioning properly in Chrome but working fine in Firefox

My code is running only in Firefox and not working in Chrome. HTML Code <div ng-controller="myController1"> Select View: <select ng-model="employeeview"> <option value="1.html">1</option> < ...

Assistance required with Jquery logic for managing different divs with individual triggers. Ensure only one div is open at a time and close all others when a new one is opened

http://jsfiddle.net/nicktheandroid/ZSvHK/ I am facing some challenges with my current code and would appreciate any suggestions for improvement. Here are the issues I am encountering: I have a set of divs, each with its own trigger button. Only one menu ...

Internet Explorer encounters errors when processing LESS code

Currently experimenting with the combination of LESS and respond.js to facilitate the development of a new website. Both LESS and respond are incredibly useful tools. However, encountered several issues with LESS in Internet Explorer. Initially, while in ...

Expand the display on mobile devices

What is the solution for adjusting a table on mobile view? I am aiming to achieve: https://i.sstatic.net/YkKAW.png However, it currently looks like this: https://i.sstatic.net/GW5mX.png Here are my code snippets: <script src="https://cdnjs. ...

Determine the position of an HTML list using Xpath by considering additional criteria

After investigating a workaround for this unresolved question, I am now facing a new challenge. I am curious if it is possible to retrieve the list position from HTML based on certain search criteria? This would enable me to reconstruct the xpath of the ...

Updating Google+ url parameter dynamically without the need to reload the page

Is there a way for a user to share a link on social media platforms like Facebook and Google+ without having to refresh the page? The user can customize the link with an ajax call, ensuring that the page remains static. Here is my code for the Google Plu ...

Previewing Jquery script with live interactive effect using Javascript

Looking to create a page where a sentence can be written and displayed in a well-designed format on the right using Jquery live preview. However, currently the design only loads after writing and reloading the page. Any suggestions on how to generate the ...

Is there a way to use JQuery to open a new window on the same page when a link is clicked? It seems possible based

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Show Content with Lin ...

I am trying to include the Css Baseline from @mui/material in my project. However, even though it is present in my JSON file, I am encountering an error stating that '@mui/material' needs to be included in the project

Struggling to import Css Baseline from @mui/material, it's listed in my json but I keep getting an error saying '@mui/material' should be included in the project's dependencies. I've been stuck on this issue for a while now! { &q ...

I'm trying to understand why this code isn't running properly. Can someone explain why my CSS is not being executed?

For some reason, using button .order{} to select elements inside the button is not applying the CSS codes as expected. The text color remains unchanged. However, when using just `.order` to select the elements, the CSS code works perfectly fine. Can someon ...

Navigating from an offspring link to a social media platform page

I just launched my website and noticed that some sites and ads redirect users to their social media pages directly from the site. For example: mysite.com/facebook redirects to facebook.com/mysitesfbpage mysite.com/twitter redirects to twitter.com/mysite ...

What is the best way to showcase my divs in a masonry layout using flexbox?

I am attempting to design display divs in a masonry style using flex/flexbox. The layout must consist of a maximum of 2 columns, with each div having the same width (thus dividing into 2 columns equally) while varying in height based on their content. Some ...

Anonymized Score Reporting through Google Analytics analytics.js

Recently, I've been working on setting up Google Analytics for tracking my web game. Everything seems to be working fine, except for one issue - when I check my custom report the next day after testing the game, I notice that all the scores have been ...

Issue with ThreeJs raycaster not returning correct event.clientY value when header bar is visible

Here's the issue: I'm trying to place a sphere on a 3D model when I click on it using ThreeJs raycaster. It works fine when the canvas covers the entire page, but if I add a header bar to the page, the positioning is off. Here are some visual ex ...

Adding metadata fields to an existing Markdown file within TinaCMS

Is it feasible to enhance a Markdown file using TinaCMS by introducing new frontmatter fields? Instead of generating a brand new Markdown file, my goal is to modify the current one by appending new frontmatter fields. Currently, I am able to modify a sin ...

What is the process to change the jQuery quiz outcome into a PDF when a user clicks a

I'm currently working on a jQuery quiz project where I want users to be able to download their results in PDF format with just one click. After doing some research, I came across the dompdf library, which allows me to convert HTML to PDF. If you&apos ...

Utilizing Translation (i18n) in AngularJS Controller to Implement Popups

I'm currently working on an AngularJS app and need to implement i18n. Everything is running smoothly except for error handling, specifically with utilizing translations in controller for popups. Here is a snippet of my controller: function showError ...