Shingai Munyuki
Shingai Munyuki

Reputation: 611

Css show and hide working in all browsers but Safari. how can i fix this?

I have a trigger toggle that shows or hides elements, its working well on chrome, but for some reason in safari, it wont work, any ideas?

   <a href='#show'class='show'>see more --></a>
   <a href='#hide'class='hide'>hide</a>

    <div class='hidden-stuff'>
      hidden divs
    </div>

css

      .show:focus + .hide {display: inline; }
                .show:focus + .hide + .hidden-stuff {display: block;}

Upvotes: 0

Views: 567

Answers (1)

max
max

Reputation: 8687

You can fix this by adding tabindex attribute.

<a href='#show'class='show' tabindex="1">see more --></a>

You can read more about this here.

Upvotes: 1

Related Questions