0

I have several components such as tooltips and menus that are not always visible. I read somewhere that visibility = hidden can throw errors in IE but I don't know how accurate that is. If so, for cross browser compatibility which property: visibility, display, or opacity can be used to hide elements is most compatible across browsers?

3
  • IE doesn't want to submit hidden form elements when a form is posted. You can give the element position: absolute and left: -10000px to effectively hide it. IE will think it's "there" but it will of course not be visible. Also, here in 2023 IE is very close to being completely irrelevant.
    – Pointy
    Commented Apr 25, 2023 at 0:11
  • So besides the initial question about compatibility, are there any performance related differences between using visibility , display and opacity properties to not show components? I started designing on Wix, where collapsing differed from hiding elements because it wasn't loaded until expanded. Do any of those CSS properties have similar differences to consider when assigning them? Commented Apr 25, 2023 at 0:35
  • There are no significant performance issues unless (and only possibly) if you're hiding tens of thousands of form fields.
    – Pointy
    Commented Apr 25, 2023 at 2:24

0

Browse other questions tagged or ask your own question.