0

Recently, a visitor complained about some DIV overlaying the page content.

A popup that actually only should display when the mouse hovers over its container:

<td class="ref" id="myContainer">
    <div><a href="otherscript.php">link text</a></div>
    <div style="position:absolute;width:200px;background-color:white">
        <?php include 'div-content.php';  ?>
    </div>
    <style type="text/css">#XcatContainer > div { display: none } #XcatContainer > div:first-child, #XcatContainer:hover > div { display: block }</style>
</td>

works like a charm in all my browsers on Windows 10 and Linux including IE11. However, it does NOT work in IE11 on Windows 7 (and IE 6 on Vista).

Now I´m considering a browser switch to disable the popup in those browsers. I could use [!if IE]; but I guess I need JS or PHP to only add that on older Windows.

Or could some reformatting make it work?

Titus
  • 452
  • 8
  • 19
  • http://www.ie6nomore.com/ and if you could post a snippet or a jsfiddle so we can see it in action? it's very difficult to tell the problem here – Toni Michel Caubet Jul 03 '18 at 11:25
  • @ToniMichelCaubet I added the HTML to the post. I would just ignore it if it was IE6 only; but it also fails in IE11 on Windows 7. – Titus Jul 03 '18 at 11:35

1 Answers1

0

You'll indeed need PHP to filter out the OS from the UserAgent.

There's more info in this answer by Funk Forty Niner.

  • According to that, and as I already have a working IE detection, `$useCssPopup = !IS_IE || !preg_match('/\bwin\d+\b|\bwindows (xp|me|nt (\d+))/i', $_SERVER['HTTP_USER_AGENT'], $tmp) || $tmp[2]>7;` (ignoring notices) should do the trick. I just wonder if I should ask for `>7` or `>8`. – Titus Jul 03 '18 at 23:48