Looking for a custom header logo that seamlessly blends with your image slider?

I'm just starting to learn about HTML and I'm trying to create a header with a logo overlapping on an image slider. I followed the method mentioned in this post: How would you make two <div>s overlap?

Unfortunately, I'm still having trouble getting the logo to overlap the slider properly.

Here's how it currently looks:

HTML

<div id="logo"><img src="engine1/logo.png" /></div>
    <div id="content"><div id="wowslider-container1">
    <div class="ws_images"><ul>
    <li><img src="data1/images/1.jpg" alt="1" title="1" id="wows1_0"/></li>
    <li><img src="data1/images/2.jpg" alt="2" title="2" id="wows1_1"/></li>
    </ul></div>
    <span class="wsl"><a href="http://wowslider.com">Gallery Javascript</a> by WOWSlider.com v5.0</span>
    <div class="ws_shadow"></div>
    </div></div></div>

CSS

#wowslider-container1 { 
    zoom: 1; 
    position: relative; 
    max-width:940px;
    margin:0px auto 0px;
    z-index:90;
    border:none;
    text-align:left;
    font-size: 10px;
    }

    #wowslider-container1 .ws_images ul {
    position:relative;
    width: 10000%; 
    height:auto;
    left:0;
    list-style:none;
    margin:0;
    padding:0;
    border-spacing:0;
    overflow: visible;
    /*table-layout:fixed;*/
    }

    #html, body {
    width: 940px;
    margin: auto;
    }

    #logo {
    position: absolute;
    left: 75px;
    top: 0px;
    width: 150px;
    height: 150px;
    z-index: 2;
    }

    #content {
    margin-top: 100px;
    } 
    

Answer №1

It seems like your z-index value is too low. Your slide is already utilizing the z-index property.

You can try implementing the following code:

#logo {
position: absolute; // Shift logo from its default position
left: 75px;
top: 0px;
width: 150px;
height: 150px;
z-index: 5000;
}

Answer №2

There may be an issue with the slider script potentially adding its own z-index for the images within. By including z-index: 91; (or higher) to the #logo element, the problem should be resolved.

Answer №3

If your Logo's z-index is set to 2, all you have to do is adjust the z-index of the #content div

#content {
margin-top: 100px;
position: relative; /* make sure this property is set */
z-index: 1; /* lower than Logo's z-index */
}

Answer №4

After conducting thorough testing in Chrome, Firefox, and Internet Explorer, it appears that the issue has been resolved successfully.

The z-index property has been set to 90 for this element.
`

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

I am looking to create a div that can consistently refresh on its own without needing to refresh

I have implemented a comment system using ajax that is functioning well. I am looking to incorporate an ajax/js code to automatically refresh my "time ago" div every 5 seconds so that the time updates while users are viewing the same post. Important note: ...

The radio buttons fail to function properly or update when clicked

Seems like I am facing a strange issue....it seems simple (and trivial for some) but it just won't work. I have a basic div with some radio buttons that are not changing state when clicked... <div id="payments_tab" class="tab-pane fade" data- ...

Arranging rows and columns in Bootstrap 3 for small screens

My layout is structured as follows: <div class="container"> <div class="row"> <div class="col-md-8> <div class="row"> <div class="col-md-12"> box 1 & ...

Creating a secondary ordered list with ongoing points - a step-by-step guide

Is there a way to create an unordered list with a continued ordered second level that automatically counts the points? I know about using <ol start="Previous number+1">, but is it possible for the list to continue numbering on its own? The ...

Can we access an element within the document using its context?

One common method to access an element is by using its id: <div id="myId"></div> <script type="text/javascript"> $(document).ready(function(){ $('#myId').something(); }); </script> However, there are inst ...

My CSS content seems to be fitting correctly, but it appears larger than anticipated. Where have I gone

I've been working on customizing my webpage for mobile phones, but I've encountered an issue. When I use the inspect tool in Chrome to make the "screen" smaller, the webpage itself appears smaller but the body element size remains unchanged, as i ...

Inserting data into a Textbox by clicking on a Div

I'm currently working on creating a wallpaper changer for my website. Right now, I'm looking to input the URL of a wallpaper into a text box when the corresponding DIV option in a CSS menu is clicked. Below is the JQuery I am using: $("div.bg8 ...

Session availability extends to subdomains, even though it may not be visible in a physical

Currently in the process of building a website Red Sec using a single account for all subdomains: Latest Updates Community Forum Personal Blog News Feed Support Us All pages share the same layout with different content by linking them to . Below i ...

Using plain text instead of HTML elements in Django

I'm working with two models, the first one looks like this: class FirstOne(models.Model): title = models.CharField(max_length=250) pretext = models.TextField(null=True, blank=True, default=None) first = models.PositiveIntegerField() la ...

Hover over two different divs with JQuery

I have a situation where I have two HTML table rows. When I hover over the first row, I want to display the second row. However, once the mouse leaves both rows, the second row should be hidden. Is there a way to achieve this using JQuery? <tr class=" ...

Tips for utilizing vulnerable web scripts on SSL-enabled pages

After implementing SSL to secure my pages, I encountered an issue where one of my scripts no longer functions properly. Specifically, I had a script on my page that was used to display the visit count from this website. Previously, it was functioning fla ...

What is the reason that styled() does not apply styles to the Material-UI <TextField /> component?

I've managed to figure out a solution, but I'm curious about why this code is working: <TextField label='Zip Code' size='small' InputProps={{ style: { borderRadius: '.4rem' }, }} sx={{ width: & ...

The problem of undefined icons in Material UI's Stepper StepLabel

Having some trouble incorporating a custom Step Label Icon within the nodes of the Stepper Component provided by Material UI. I want to add an icon to each circle, similar to what is shown in this Material UI demo: https://i.sstatic.net/WLOcS.png However, ...

Generating a dynamic method for uploading multiple files

Is there a way to dynamically generate multiple upload forms upon clicking a button? I currently have code that allows for uploading one file, but I would like to be able to add additional forms for each file. In other words, if I need to upload 7 files, I ...

Struggling to float <aside> to the left of <article> for proper alignment?

tldr; I'm attempting to position the aside-section to the left of the article-section (similar to a sidebar/side column), but my "float" property doesn't seem to be working at all. Is there a way to achieve this without modifying the HTML code an ...

Discovering the previously dropped value from a droppable div

Currently, I am developing a dynamic formula generator using jQuery's drag and drop functionality. Here is what I have accomplished so far: I have two lists: <ul id="head"> <li class="horizontal">Salary</li> <li class="h ...

I am experiencing difficulties with my focusin not functioning properly for the input element that I added

I am working on a program that includes a dynamic table with the following structure: <table id="selectedItems"> </table> I plan to use jQuery to append elements to it like so: var i=0; $("#selectedItems").html(''); $("#sel ...

Include category to the smallest element

I am attempting to use JQuery to find the height of the tallest element and then add that height to other elements that are shorter. My goal is to assign the class, main-nav-special-padding, to these shorter elements using my current JQuery code. I tried t ...

Why am I unable to choose an element by its Id?

My goal is to pass an ID as an argument to a function in the following manner: HTML <button type="button" class="like btn" onclick="like('<%=postid%>')"> <svg id ='<%=likei ...

My website gets all wonky when I try to resize the browser

Here is a visualization of my website's ideal appearance: However, the actual display varies on different computers. After testing with browsershots.org, I noticed that my website looks messy on most browsers and even when resizing the browser window ...