Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

difference between visibility:hidden and display:none

  1. #1

  2. #2
    Junior Member
    Join Date
    Sep 2015
    Posts
    26
    Thanks
    0
    Thanked 2 Times in 1 Post

    Default

    Display: none completely strips an element from the page. This means that if you apply display: none to an element, it won’t appear on your website and there will be no visible evidence of it ever having existed — meaning that the surrounding elements will treat the element as empty space and adapt accordingly.

    Visibility: hidden simply hides an element from the page, while still rendering the tag in the viewport. This means that even though the element is invisible, there is still space allocated for it on the page, and the surrounding HTML elements will respect that space.

  3. #3
    Junior Member
    Join Date
    Sep 2016
    Posts
    117
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    As far as I understand, when you use visibility: hidden, the element is not visible, but it still occupies space in the layout. When you use display: none, the element not only is invisible, but it does not take up any space in the layout.


    Newspaper Ad Agency in Delhi

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •