The box text shakes when you hover over it

I'm having some trouble with the text in my code interacting with the boxes. Here is a demonstration: http://jsfiddle.net/K6wy3/1/

The issue lies within this section of the code. The box hover effect works fine, but the text seems to flash and jitter when hovered over. Any suggestions on how to fix this?

Thank you in advance. CSS:

ul {list-style: none; font-family: Arial,Helvetica,sans-serif,serif; font-size: 12px; color: #000;}
a.exp {width: 145px; height: 34px; position: absolute; top: 0px; left: 0px; opacity:0.0; filter:alpha(opacity=0); z-index: 100;}
div.exp {display: none; position: absolute; top: 100px; left: 0px;}
a.exp:hover + div.exp {display: inline; z-index: 300;}
#wrap:hover > a.exp {display: inline; position: absolute; top: 0px; left: 0px; width: 787px; height: 450px; opacity:100.0; filter:alpha(opacity=100); z-index: 200;}
#wrap:hover > .exp {display: inline;} 
img.allcategoriesBTN:hover {z-index: 0;}
.topHalf {
    background-color: #222;
    opacity:0.0;
    filter:alpha(opacity=00);
}
.botHalf {
    background-color: #555555;
}
.background {
    position: absolute;
    top: -2px;
    left: -3px;
}           
.backbox { 
    padding: 0;
    margin: 0;
    position: absolute;
    top: 0px;
    left: 0px;
    width: 0px;
    width: 787px;   
    height: 34px;
    color: #000;
    float:left;
    background-color: #999;
}

HTML:

<div id="wrap">
    <a class="exp" href="#url" tabindex="1">
        <TABLE class="background" width=100.5% height=100% cellpadding=0 cellspacing=0 border=0>
            <TR>
                <TD width=100.5% height=8% class="topHalf">&nbsp;</TD>
            </TR>
            <TR>
                <TD width=100.5% height=92% class="botHalf">&nbsp;</TD>
            </TR>
        </TABLE>
    </a>
    <div class="exp">
        <ul id="list">             
            <li><a href="http://www.google.co.uk/">Google</a>
            <li><a href="musings.html">Musings</a>
            <li><a href="town.html">My town</a>
            <li><a href="links.html">Links</a>
        </ul>
        <img class="allcategoriesBTN" src="http://www.mediafire.com/convkey/2a45/702142qw7au3hdufg.jpg?size_id=2">
    </div>
</div>

Answer №1

The issue lies within the z-index of

#wrap:hover > a.exp

It seems that there is a conflict with other elements that are also z-indexed. To address this problem, you can consider using visibility:hidden and visibility: visible to hide it when needed.

Answer №2

Issue Resolved: It seems that the tags I originally used were not properly selecting the #list element. By reformatting the HTML and implementing a :hover css function on the #list, I was able to eliminate the Jittering.

html {-webkit-animation: safariSelectorFix infinite 1s;}
        @-webkit-keyframes safariSelectorFix {
        0% {zoom:1;} 
        100% {zoom:1;}
        }

        /* Line Break (All Categories) */
        ul {list-style: none; font-family: Arial,Helvetica,sans-serif,serif; font-size: 12px color: #000;}
        a.exp {width: 145px; height: 34px; position: absolute; top: 0px; left: 0px; 
               opacity:0.0; filter:alpha(opacity=00); z-index: 100;}
        #list {visibility: hidden; position: absolute; top: 100px; left: 0px;  z-index: 200;}
        a.exp:hover + #list {visibility: visible;}
        #wrap:hover > a.exp {position: absolute; top: 0px; left: 0px; width: 787px; height: 450px; 
                             opacity:1.0; filter:alpha(opacity=01);}
        #wrap:hover > #list {visibility: visible;}
        img.allcategoriesBTN:hover {z-index: 0;}

        .topHalf {
            background-color: #222;
            opacity:0.0;
            filter:alpha(opacity=00);
        }
        .botHalf {
            background-color: #555555;
        }
        .background {
            position: absolute;
            top: -2px;
            left: -3px;
        }

        .backbox { 
            padding: 0;
            margin: 0;
            position: absolute;
            top: 0px;
            left: 0px;
            width: 0px;
            width: 787px;   
            height: 34px;
            color: #000;
            float:left;
            background-color: #111;
        }

    img.allcategoriesBTN {
        width:140px;
        height:34px;
        background: url(http://www.mediafire.com/convkey/2a45/702142qw7au3hdufg.jpg?size_id=2) 0 0;
        padding: 0;
        margin: 0;
        position: absolute;
        top: 0px;
        left: 0px;
    }

HTML:

<div id="wrap">
<img class="allcategoriesBTN" src="http://www.mediafire.com/convkey/2a45/702142qw7au3hdufg.jpg?size_id=2">
<a class="exp" href="#url" tabindex="1">
<TABLE class="background" width=100.5% height=100% cellpadding=0 cellspacing=0 border=0>
 <TR>
    <TD width=100.5% height=8% class="topHalf">&nbsp;</TD>
 </TR>
 <TR>
    <TD width=100.5% height=92% class="botHalf">&nbsp;</TD>
 </TR>
</TABLE>
</a>
<ul id="list">             
    <li><a href="http://www.google.co.uk/">Google</a>
    <li><a href="musings.html">Musings</a>
    <li><a href="town.html">My town</a>
    <li><a href="links.html">Links</a>
</ul>
</div>

Answer №3

Dealing with jitter is a common occurrence when using Safari. Applying anti-aliasing to the font helps reduce the jitter:

html {  
    -webkit-font-smoothing: antialiased;
}

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

Concealing a menu once the mouse moves away from both the menu header and the menu content

When hovering over a parent element with a dropdown menu, the menu body appears. The goal is to hide the menu body only when the mouse leaves either the menu head or the menu body itself. So far, the issue is that the body disappears when the mouse leaves ...

Manipulating intricate CSS properties with JavaScript

Can anyone explain how to implement the CSS shown below in JavaScript? #absoluteCenter { left: 50% !important; top: 50% !important; -webkit-transform:translate(-50%,-50%)!important; -moz-transform:translate(-50%,-50%)!important; -ms-tr ...

The edges of the cube are not joined together

Looking for a 3D transform cube that can freely flip left and right, with the button fitting into it perfectly. I've found the CSS code to achieve this, but when I set the width of the ".cube" below 200px, the borders of the cube don't connect. I ...

Modify a different tag within CSS

I am attempting to reduce the space between the words: "frihedskamp og fremtidsforelskelse" When I remove the CSS tag in line 149, the spacing returns to normal. To address this, I tried adding the following override on line 266: HTML <div class="col ...

The properties of the box model applied to unidentified inline boxes

Reference: CSS Specification Text directly contained inside a block container element (not within an inline element) is considered as an anonymous inline element. For example, in an HTML document like this: <p>Some <em>emphasized</em> ...

I'm having trouble retrieving the HTML code from LinkedIn through web scraping. Is there something I'm missing?

Currently, I am attempting to scrape the 'specialties' section from certain companies on LinkedIn's about page. Unfortunately, when using beautiful soup to access LinkedIn's data, I encounter an access denied error. To workaround this i ...

Error: Unable to assign value to the innerHTML property of an undefined element created by JavaScript

When designing my html form, I encountered an issue where I needed to display a message beneath blank fields when users did not fill them out. Initially, I used empty spans in the html code to hold potential error messages, which worked well. However, I de ...

Issue with email layout formatting in Outlook 2013 on Windows 7

I have made some modifications to an email template originally designed by Campaign Monitor. The template is responsive and functions well on most email clients. However, I am facing formatting issues with the email header specifically on Outlook 2013 whe ...

Dynamic addition of CSS classes to HTML elements using PHP

I'm working on developing an application that includes multiple courses. Each course is completed over a certain number of days, such as 14 days or 20 days. To visually track progress, I've implemented a step progress bar that looks like this:htt ...

Having trouble retrieving the image from the /var/www/efs/image/ directory using the html <img src> tag

Currently, I am facing a challenge in my project where I am trying to retrieve an image based on the users ID. The image is stored in the /var/www/efs/image folder. I attempted to specify the directory using the following code: <img src={"/var/www/ ...

On click, triggering the class "animate__animated animate__bounce" to activate

Just starting to learn html and css and came across this awesome library: Here's the code snippet I have so far: <head> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.mi ...

Why does my jQuery map code work in version 2.0 but not in version 3.0?

I've encountered an error with a jQuery map snippet that I'm trying to troubleshoot. It was working fine under jQuery 2, but after upgrading to version 3, it doesn't work anymore and I can't figure out why. Feeling stuck! var menuIte ...

Tips for resetting the form input fields in Vue.js after the user has successfully submitted the form

I am facing an issue with my registration page. After the user enters some values and successfully submits the form, I want to clear all the fields. To achieve this, I am using a predefined function called reset() inside the script section. However, the ...

Is there a way to translate an array into an HTML grid layout?

I am currently working on mapping an array into image sources to create an image gallery. The issue I am facing is that it only maps down one column, and I am unsure how to make it fill the other columns as well. Any suggestions or tips would be greatly ap ...

Understanding the scope of the variable in Angular's *ngFor directive when used with

After recently starting my journey with Angular, I came across an interesting realization. The ngFor directive is actually placed on the child element that requires repetition rather than the parent element itself. For example, when dealing with a list of ...

Information is not appearing in the dropdown menu

As a beginner in JavaScript, this is my first program. I have written HTML and JavaScript code to display data in a dropdown menu from a Python Django database. However, when I run it, the data is not showing up. Here is my code: <!DOCTYPE html> < ...

Is it possible to have 1 million links on a single webpage?

Would the performance suffer if I were to fetch 1 million link elements and add them to the DOM? I am looking to create a navigation list at the top of my website, similar to what Apple has on their site where you can scroll left or right using your keybo ...

Sleek design featuring a header, footer, Left Menu, Content, and RightMenu implemented on Bootstrap 4-5

Can you help me create a minimal layout using Bootstrap 4-5 with a header, footer, LeftMenu, Content, and RightMenu? The combined width of LeftMenu, Content, and RightMenu should be similar to the main block on the current site (htmlforum.io). This means ...

In your web projects, how many external conditional stylesheets do you typically incorporate specifically for Internet Explorer?

What is the number of external IE Conditional Style-sheets utilized in your web projects specifically for Internet Explorer? Make sure to review this page before you provide an answer: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/ ...

Automating Web Form Completion with VBA and Selenium

I am experiencing an issue with filling out a form. I have attempted the following methods: driver.FindElementByXPath("//div[@id='s_dane_dokumentu-section?grid-1-grid?c_nr_lrn_komunikatu-control?xforms-input-1']").sendkeys "2112345 ...