eliminate odd gaps

Query:

Is there a way to remove the space shown in the first image?

Additional Information and Code:

I am working on displaying a list of contacts one above the other. When a user hovers over a contact's name, a contact card appears with an email icon. Everything works fine when the email icon is positioned in the top right corner. However, if I add padding to move it to the bottom right corner, a strange space appears between the contact names when the page initially loads. Once the user hovers over and the contact card displays, the space disappears and the contact list looks as desired.

Here is my code: HTML:

<div id="ball">
      <div id="thisisatest" onmouseover="showIt('/images/em.png', 'tomJustice')" onmouseout="hideIt('tomJustice')" >       
            <img src="/images/bluesquare.png" height="15" width="15" ></img>     tom Justice
            <img src="" id="tomJustice" style="margin-left: auto; overflow:hidden; padding-top: 20%" onclick="showIt('/images/card22.png', 'tomJustice2')" onmouseout="hideIt('tomJustice2')">
            <img src="" id="tomJustice2" style="display:none"></img>
            </br>
      </div>
... other contacts
</div>

Answer №1

What is the reason for not simply providing a

position: absolute; 

and also

right: 0; bottom: 0;

You could easily position it within a div

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

Create a dynamic animation of an image expanding and shifting towards the center of its parent container

Is it possible to animate an SVG image within a div to grow to 80% screen height and move to the center of the parent div when a specific function is called? If so, how can this be achieved? function openNav(){ $("#topnav").animate({height:'100%& ...

Implement jQuery Tabs in Brackets software to enhance user experience

My Adobe Creative Cloud subscription is expiring soon, and I am considering switching to Brackets, an open-source code editor developed by Adobe. However, I am facing some difficulties adding jQuery tabs to my HTML documents. I downloaded the 1.10.4 zip f ...

Modify the appearance of the elements dynamically by applying styles from the CSS file without relying on the

In my CSS file, I have the following styles: .myClass { ... } .myClass:focus { ... } Am I able to modify these styles from my code? For instance, can I change the focused style of an input element when a button is pressed? ...

Explore the data within a directory containing files and subfolders using javascript, HTML5, AngularJS, or jQuery

I'm looking to access and read files as well as subfolders within a folder that is selected using <input type="file"> I understand that I could potentially use <input type="file" multiple webkitdirectory />, but this solution is specific ...

Internet Explorer 8 is causing alignment problems with sidebars on certain websites within a Wordpress multisite setup

I am managing a Wordpress multisite setup with the following websites: The main portal: which connects to The issue arises on all pages of gprgebouw.nl and gpradvies.nl but not on the other domains. Attached is a screenshot of the homepage of gprgebouw. ...

Displaying consistent headers on all printed pages in Chrome browser using Vue.js

Hey there, I'm currently working on code to print the page in my Vue web application. I want to have a static header appear on every page, either by using CSS or JavaScript. I've created a header div component and set its position as fixed. It&ap ...

Troubleshooting: Issue with Ajax communication to PHP backend script

I followed the solution on this Stack Overflow post but unfortunately it did not work as expected. When I open test.php, I see a box to input text and a submit button. However, when I try to submit the form, Firefox's developer console shows the follo ...

Move images horizontally next to the height of an element

I am attempting to increase the top attribute in relation to the element it is currently adjacent to. The element should only scroll directly next to the other element and cease when it surpasses the height of that element. My Goal: I want the image to re ...

When calling canvas.getContext('2D'), the function returns a null value

After creating a canvas and calling its getContext() method, I was confused when it returned null for the context. Below is the code snippet that I used: <script> window.onload = initializeCanvas; function initializeCanvas(){ ...

Mixing box-shadow and blur filters can result in unusual artifacts appearing in Webkit browsers

Recently, I encountered an intriguing and frustrating bug in WebKit browsers. Consider a scenario where there is a parent DIV (let's say .wrapper) and a child DIV (.main). You apply a box-shadow on the .main DIV and a blur filter on the .wrapper DIV. ...

Select elements in jQuery using both a specific selector and a negative selector

I am currently working with a JQuery function that highlights a specific word and scrolls to it: $('article.node--article p, .video-title').highlightWordAndScroll({ words : search_word, tag : '<span class="found_key ...

There seems to be a problem with the background repeating space in the CSS

body { background-image: url("https://source.unsplash.com/user/c_v_r/100x100"); background-size: 100px; background-repeat: space; } <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA- ...

Is it possible to insert a variable into a span or v-tooltip tag?

I am currently using vue 2 along with vuetify 2, and I seem to be encountering an issue when attempting to display data from a table. Whenever I insert curly braces between the v-tooltip tags, it results in a blank page. Below is an example of the code: &l ...

Why is the col-1 in Bootstrap stacking up instead of flowing horizontally as intended?

Check out my HTML/CSS code below: <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <d ...

Once the div content is reloaded using AJAX, the refreshed HTML suddenly vanishes

My JS code reloads the div every 2 seconds: var auto_refresh = setInterval(function() { $('#indexRefresh').load('/includes/index_refresh_include.php?_=' + Math.random()); }, 2000); After that, I have an AJAX request that loads mor ...

``There seems to be an issue with AngularJS UI-view not loading properly when ngOptions

I am new to using Angularjs and I encountered an issue where including a select element on the page causes the ui-view not to load. The page appears blank, but when I remove the ng-model attribute from the select element, everything works fine. Can someo ...

How can you use only CSS (without jQuery) to hide a div and display another?

Is there a way to keep Collapse 2 directly under Collapse 1 when Content 1 is displayed? I attempted to reorganize the code, but it resulted in chaos. :D .collapse{ cursor: pointer; display: block; background: #cdf; } .collapse + input{ displa ...

Incorporating CSS into an HTML document with Jersey/Grizzly

This is the structure of my project: src/main/java -- main.java src/main/resources -- webapp -- -- css -- -- js -- -- images -- -- pages -- -- -- home.html Currently, my Maven project utilizes Jersey and Grizzly. I am able to call my REST services and lo ...

Customizing badge colors in Bootstrap using data from MySQL

Is it possible to dynamically change the color of Bootstrap badges based on MySQL data using PHP only? For example, if I have a column with 'status = 1', which is a TINYINT datatype and can have one of three different status values, I want each ...

What exactly does original-title refer to in HTML coding?

I have been searching extensively, but I cannot find any information that explains the meaning and proper usage of the original-title in HTML code. I am unsure if original-title is a Tag or Attribute in HTML, and if it is the same as title? I came across ...