Pregunta

So I have a web page where a div is being filled with dynamic content which sometimes goes off the page. The div contains some tables filled with cells, each cell with the title attribute attached to them. When I hover over the table cells the div starts flickering.

The scroll bar on the side is too small as well. But as soon as I start scrolling it expands to fit the entirety of the content. After scrolling all the way to the bottom hovering over the table cells no longer causes flickering.

Obviously I don't want my content to flicker when the user moves the mouse over it. Removing the title attribute also fixes the problem, but I would like to be able to keep it there.

This problem is only present in IE8 and below. I haven't tested IE9+, but it works as intended in Chrome and Firefox.

Has anyone bumped into this problem before? Is there an easy substitution for the title attribute? Any input is welcome and appreciated. The code for one of the tables is below:

<table class="main_html">
<tr class="main_html" id="5">

    <td class="hour_slot" title="21:00" id="Alpha210000" value="21:00:00"></td>
    <td class="hour_slot" title="21:30" id="Alpha213000" value="21:30:00"></td>

    <td class="hour_slot" title="22:00" id="Alpha220000" value="22:00:00"></td>
    <td class="hour_slot" title="22:30" id="Alpha223000" value="22:30:00"></td>

    <td class="hour_slot" title="23:00" id="Alpha230000" value="23:00:00"></td>
    <td class="hour_slot" title="23:30" id="Alpha233000" value="23:30:00"></td>

    <td class="hour_slot" title="23:59" id="Alpha235959" value="23:59:59" style="border:none;"></td>
</tr>
</table>
¿Fue útil?

Solución

This is because a td does not natively have a title attribute. Or a value attribute for that matter. Why not try this:

<table class="main_html">
    <tr class="main_html" id="5">
        <td><div class="hour_slot" title="21:00" id="Alpha210000"></div></td>
        ...
    </tr>
</table>

This way, using divs, you can give it what attributes you require.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top