Home > Blockchain >  How can I hide the div without using display:none or JavaScript?
How can I hide the div without using display:none or JavaScript?

Time:06-15

<a data-toggle="modal" data-target="#myModalSync">Sync</a> => how to hide html tag without using display: none or js, just using pure css

CodePudding user response:

You can hide any div using visibility CSS but it's stayed in same position and same same space then you need to simply use height 0 and width 0 when you visible that's div then you can resize the height width, Css is here, Hope it will help you

div{
    visibility: hidden;
    opacity: 0;
    width: 0;
    height: 0;
   }

CodePudding user response:

You could set the z-index to negative value so it's covered up by other content.

  • Related