An empty space is being created in the HTML where the div is located, yet the overlay position is not

Seeking assistance on how to eliminate the gap above the slider. The space mirrors the image's height precisely. Any suggestions? I attempted using overflow hidden, but it doesn't seem to be effective.

Appreciate any help!

HTML

<div class="overlayImage"></div>
<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider">
<img src="images/collin-banner.jpg" data-thumb="Images/Slider/christmas_concert_slider.jpg" alt="" />
<img src="images/toystory.jpg" data-thumb="Images/Slider/join-the-chorus.jpg" alt="" />                                 
<img src="images/up.jpg" data-thumb="Images/Slider/book-the-chorus.jpg" alt="" />
<img src="images/walle.jpg" data-thumb="Images/Slider/ways-you-can-give.jpg" alt="" />                              
</div><!-- end slider --->                      
</div><!--- End slider-wrapper theme-default--->

CSS:

.overlayImage {
    z-index: 999;
    background-image: url(../images/logo-overlay.png);
    background-position: center;
    position: relative;
    margin: 0 auto;
    background-size: 484px 185px;
    width: 484px;
    height: 185px;
    top: 320px;
    overflow:hidden;
}

Answer №1

Check out the DEMO

.overlayImage {
    z-index: 999;
    background-image: url(../images/logo-overlay.png);
    background-position: center;
    position: absolute; //updated
    margin: 0 auto;
    background-size: 484px 185px;
    width: 484px;
    height: 185px;
    top: 0px;  //updated 
    overflow:hidden;
}

Visit this link for more information on the CSS POSITION PROPERTY

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

Automate the process of launching the <select> picker through programming

In an Android WebView, I need a way to programmatically trigger the opening of the select element picker provided below. <select id="select1" multiple="multiple"> <option value="MDO1" selected="selected">MDO 1</option> <option val ...

AngularJS: Number Retrieval and Output

Is it possible to utilize AngularJS to restrict a textarea to only accept numbers and return characters (/n/r)? I'm aiming for a format similar to the following: <textarea> 2344 5335 55555 2222 234 </textarea> The example above showcases ...

Disabling 'Input Number' feature is ineffective in Firefox browser

Is there a way to prevent the input value from changing when the up or down arrow is held, even if the input is disabled? I want to retain the arrows without allowing this behavior on Firefox. Give it a try: Press the up arrow. After 5 seconds, the input ...

Send form information using the REST method

Can someone provide guidance on how to properly handle this endpoint in my code? @PostMapping("/createUser") public ResponseEntity<User> createUser(@RequestBody User user) {...} I am looking to implement a user creation feature on my HTML ...

No space left around the image's border

Whenever I apply a border to an image, it comes with a margin and the image itself receives white padding. How can I remove the margin from the border? This is how I currently have it: border: 1px solid gray; ...

Adding negative values to the Tailwind CSS utility plugin is a simple process that can greatly enhance

Adding Negative Values to Tailwind CSS Utility Plugin Quick Summary: I've developed a custom Tailwind utility plugin that includes numeric values. I'm looking for a way to introduce negative numbers by adding a - at the start of the class, simi ...

Guide to Repairing Uncaught TypeError: players.setAttribute is not a recognized method?

I'm a beginner and encountered an error saying Uncaught TypeError: players.setAttribute is not a function when submitting an action. How can I solve this issue? Please share your insights. ''' //selecting all necessary elements const s ...

Reveal a concealed div in a modal form depending on the value present in the input field

After spending the past 4 hours scouring through Google and SO, I finally stumbled upon an answer HERE that seemed to be somewhat close to what I was looking for. However, in my scenario, the <div class="fhlbinfo"> elements are not displaying or hi ...

Optimizing White Space in Firefox

Recently completed the construction of my new website, it appears flawless when viewed on Chrome. However, upon inspecting it on Firefox (OS), I noticed that there is an approximately 15px space at the bottom of the page. I am struggling to identify what m ...

The inline $Emit function is not generating the correct random number when using Math.random()

I've been diving into the concept of $emit event in Vue and came across this tutorial: . I tried implementing something similar using Vue2.js, but every time I click the button, it gives me a rounded number instead of a random number like in the guide ...

Discovering the chosen value from an asp.net radio button control based on its class can be accomplished using Jquery

Currently, I am working with a radio button control that is defined like this: <asp:RadioButtonList ID="rbQ2" CellSpacing="10" runat="server" class="rbQ2" CssClass="radioButtonList" RepeatDirection="Horizontal" RepeatLayout="Table" onclick="javascript: ...

What's causing the issue with the rot-corona animation not functioning properly?

I am currently working on a project related to the coronavirus, and I am having trouble with the animation "rot-corona." I need it to rotate 360 degrees every 3 seconds. Please note that Bootstrap 4 is being used in this project. Code /* SCSS */ #rota ...

I'm having difficulties with separators in CSS when I attempt to insert one

Hey there, I've encountered an issue with my separator: #menu li:not(:first-child):before { content: " | "; } Despite this code working, the first li item isn't being separated like the others. This is the current output I'm getting: t ...

Exploring the Features of Bottom and Right in jQuery

Here is a snippet of jQuery code that I included in a sample program: $('#left').click(function(){ $('.box').animate({ left: "-=40px", }, function(){/* End of Animation*/}); }); $('#right ...

What is the best way to store changing images in a Next.js application?

Is it possible to set the cache-control for images in a list of objects received from an API? Each object in the list contains a property called imageUrl, which is the link to the image. ...

Tips for choosing and deselecting data using jQuery

Is there a way to toggle the selection of data in my code? Currently, when I click on the data it gets selected and a tick image appears. However, I want it so that when I click again on the same data, the tick will disappear. How can I achieve this func ...

Link to text on tablet and phone

On my website, I have included a phone number in the HTML as text. When viewed on an iPad tablet, it automatically interprets the phone number and turns it into an underline blue link. Is there a way to format the phone number in a different style so it d ...

Creating a Piechart in Kendo UI that is bound to hierarchal remote data

I am facing an issue with binding remote data to a pie chart while managing a grid with dropdown sorting options. The grid is working fine, but I am unable to display the hierarchical data on the pie chart as categories. <!DOCTYPE html> <html> ...

What is the best way to create CSS rules that can be dynamically applied as classes using JavaScript?

I have been attempting to use the addClass function in JavaScript to add a class, but I am struggling to make it work. Is there a specific way to define a class that will be added to an element when clicked on? Here is what I have attempted: var input = ...

Creating custom themes in React Native using dynamically loaded JSON data

Is it possible in React Native to override custom styles with dynamically fetched font-size and background color values from a server's JSON data? I am looking to incorporate this JSON data theme into my style themes. Can you provide the syntax for cr ...