0

I'm trying to create some CSS-only tabs using the [id^=tab]:checked + .tab-content { display: block; } approach that I see many websites saying is the right approach.

My code produces the proper results in IE, Firefox and Chrome but it fails to work in a browser component (System.Windows.Forms.WebBrowser) within my C# program.

I thought the browser component was basically IE stripped of all user interface, why does this not work??

Loren Pechtel
  • 8,945
  • 3
  • 33
  • 45
  • Yes and no. The browser component _is_ Internet Explorer but it might render your website in IE7 mode. Which would be OK, in ancient times. See [this answer](http://stackoverflow.com/a/4613025/2474175) to try and convince the component to use the currently installed version of IE. You can also check [this reference](http://caniuse.com/#feat=css-sel3) which shows that IE7 does not support pseudo classes (or at least `:checked`). – Andrei V Jun 19 '15 at 20:54
  • 1
    @AndreiV If it's working in IE7 mode that would certainly explain it--the place I found the code specifically said it only worked on IE9 and above. Confirmed, that was it. It works now. – Loren Pechtel Jun 19 '15 at 20:58

0 Answers0