I have a 3-column section and the middle column contains two blocks of text - A and B. If the link in column 1 is hovered over, I want block A to appear. If the link in column 3 is hovered over, I want block B to appear.
Here is my code so far:
.google, .text, .yahoo { width:33% ; display:inline-block ; text-align:center}
.google, .yahoo { background:red }
.text { background:yellow }
.google-text, .yahoo-text { display:none }
.google a:hover .google-text { display:block }
.yahoo a:hover .yahoo-text { display:block }
<div class="container">
<div class="google"><a href="https://google.com">Google</a></div>
<div class="text">
<div class="google-text">I love Google</div>
<div class="yahoo-text">I love Yahoo</div>
</div>
<div class="yahoo"><a href="https://yahoo.com">Yahoo</a></div>
</div>
For the life of me I can't get it to work. What am I doing wrong? I'm trying to do this using pure CSS, no javascript if possible.
Any help would be most appreciated.
Thanks!
C