css - Div hover on icon with SASS -


this question has answer here:

i doing mistakes on how show div when hover mouse on icon text.

the problem div comes out when hover on entire line of title. problem in sass or in structure of page, o both? want div coming out on mouse hover in icon info

you can see example here: http://codepen.io/anon/pen/gdujf

here html:

<div id="spincastjs">     <div id="spintitle">       <h1>example<span id="spininfo">i</span></h1>       <div id="instructions">         <p>lorem ipsum dummy text of printing , typesetting industry. lorem ipsum has been industry's standard dummy text lorem ipsum dummy text of printing , typesetting industry. lorem ipsum has been industry's standard dummy text</p>       </div>     </div> </div> 

and styles

#spincastjs   #spintitle     background: #ddd     padding: 6px      h1     text-align: center     color: #04677e     font-weight: bold     font-size: 1.2em      #instructions       display: none       position: absolute       background: #ffffff       right: 0px       height: 100px      #spininfo       float: right       font-style: normal       font-size: 1.1em       background: #ddd       height: 50px       width: 18px       color: #ffffff       border-radius: 3px       background: #bf24bf     &:hover       #instructions         display: block         border: 1px solid #ddd 

you need have element show, inside #spaninfo span

for eg: have put in code below, div id test inside span example.

html

 <h1>example<span id="spininfo">i<div id="test">test</div></span></h1> 

sass

 #spintitle    #spininfo      float: right      font-style: normal      font-size: 1.1em      background: #ddd      height: 50px      width: 18px      color: #ffffff      border-radius: 3px      background: #bf24bf      display: block      &:hover        #test          display: block          border: 1px solid #ddd          color: red 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -