Note that there are some explanatory texts on larger screens.

plurals
  1. POMaking a div appear upon hovering on another div
    primarykey
    data
    text
    <p>I have searched a lot for this, I can not find an answer. I want the div SubTopicInfo1 to appear when hovering over the div subTopicNav1. I need it to be only CSS.</p> <p>Here is what I have: </p> <p><a href="http://jsfiddle.net/H9fGP/" rel="nofollow">Fiddle</a> </p> <p>HTML:</p> <pre><code>&lt;div id="NavBar"&gt; &lt;div id="Mainbutton"&gt; &lt;center&gt;&lt;h2 style="margin-top: 7px;"&gt; Main &lt;/h2&gt;&lt;/center&gt; &lt;/div&gt; &lt;div id="topic1button"&gt; &lt;center&gt;&lt;h2 style="margin-top: 7px;"&gt; Skiing &lt;/h2&gt;&lt;/center&gt; &lt;/div&gt; &lt;div id="topic2button"&gt; &lt;center&gt;&lt;h2 style="margin-top: 12px;"&gt; Movies &lt;/h2&gt;&lt;/center&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="Main"&gt; &lt;div id="IntroImage"&gt; &lt;/div&gt; &lt;div id="Title"&gt; &lt;h2 id="Titlemain"&gt; TYLER POTTS&lt;/h2&gt; &lt;/div&gt; &lt;div id="SubTopicNav"&gt; &lt;div id="subTopicNav1"&gt; &lt;center&gt;&lt;h2&gt;About Me&lt;/h2&gt;&lt;/center&gt; &lt;/div&gt; &lt;div id="subTopicNav2"&gt; &lt;center&gt;&lt;h2&gt;Skiing&lt;/h2&gt;&lt;/center&gt; &lt;/div&gt; &lt;div id="subTopicNav3"&gt; &lt;center&gt;&lt;h2&gt;Movies&lt;/h2&gt;&lt;/center&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="SubTopicInfo"&gt; &lt;div id="SubTopicInfo1"&gt; &lt;h1&gt; Test &lt;/h1&gt; &lt;/div&gt; &lt;div id="SubTopicInfo2"&gt; &lt;/div&gt; &lt;div id="SubTopicInfo3"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="Footer"&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>CSS:</p> <pre><code>#NavBar { width: 750px; height: 40px; background-color: white; margin: 0 auto; border-top: 5px solid #FFD640; border-bottom: 5px solid #FFD640; } #topic2button { width: 100px; height: 45px; margin-top:-50px; margin-left: 215px; float:left; } #topic2button:hover { background-color: #FFD640; } #Mainbutton { width: 100px; height: 45px; margin-top:; margin-left: 315px; float:left; } #Mainbutton:hover { background-color: #FFD640; } #topic1button { width: 100px; height: 45px; float: left; } #topic1button:hover { background-color: #FFD640; } #Main { width: 750px; height: 1000px; margin: 0 auto; background-color: white; } #IntroImage { width: 750px; height: 150px; background-image:url("http://skiersedgeproshop.com/wp/wp-content/uploads/2013/11/snow-mountain-ski1.jpg") } #IntroImage:hover { opacity: 0.8; } #Title { width: 500px; height: 40px; border-top: 5px solid #FFD640; border-bottom: 5px solid #FFD640; margin:0 auto; margin-top: 10px; } #Titlemain { margin-left: 170px; margin-top: 6px; } #SubTopicNav { width: 150px; height: 400px; border-top: 5px solid #FFD640; border-bottom: 5px solid #FFD640; margin-top: 25px; float:left; } #subTopicNav1 { margin-top: 60px; width: 150px; height: 50px; } #subTopicNav2 { margin-top: 60px; width: 150px; height: 50px; } #subTopicNav3 { margin-top: 60px; width: 150px; height: 50px; } #subTopicNav1:hover { margin-top: 60px; width: 150px; height: 50px; background-color: #FFD640; } #subTopicNav2:hover { margin-top: 60px; width: 150px; height: 50px; background-color: #FFD640; } #subTopicNav3:hover { margin-top: 60px; width: 150px; height: 50px; background-color: #FFD640; } #SubTopicInfo { width: 600px; height: 400px; border-top: 5px solid #FFD640; border-bottom: 5px solid #FFD640; margin-top: 25px; float: left; } #SubTopicInfo1 { display:none; background-color: #FFD640; } #subTopicNav1:hover + #SubTopicInfo1 { display: block; } </code></pre> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload