Web Analytics Made Easy -
StatCounter Underline w/ CSS in DIV not working - CodingForum

Announcement

Collapse
No announcement yet.

Underline w/ CSS in DIV not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Underline w/ CSS in DIV not working

    I have a code:

    Code:
    <style type="text/css">
     .FAQ { cursor:hand; cursor:pointer;
            border:0px; width:50%;}
     .FAA { display:none; }
    #qtext {
    	color: #3B5998;
    }
    </style>
    
    <script type="text/javascript">
    function toggle(Info) {
      var CState = document.getElementById(Info);
      CState.style.display = (CState.style.display != 'block')
                           ? 'block' : 'none';
    }
    </script>
    </head>
    <body>
    <h2>FAQ</h2>
    
    
    <DIV class="FAQ" onclick="toggle('faq1')">
     					<span id="qtext">Can you do every repair on-site?</span>
    					<div id="faq1" class="FAA">No, some repairs cannot be completed on-site due to time constraints.</div>
    </DIV>
    
    <DIV class="FAQ" onclick="toggle('faq2')">
    					 whassup now?
    					 <div id="faq2" class="FAA">still nadda</div>
    </DIV>
    
    <DIV class="FAQ" onclick="toggle('faq3')">
     					How about now?
     					<div id="faq3" class="FAA">How many times must I say <b>nothing</b>?</div>
    </DIV>
    I cannot get things like, "Can you do every repair on-site?" to be underlined when hovered over.

    Anybody know?

  • #2
    Toggled Divs

    ToggledDivs
    Don't forget to mark solution providing post as "Answered".
    It helps others to find correct solutions!

    Comment


    • #3
      Originally posted by Squishy435 View Post
      Code:
                           <span id="qtext">Can you do every repair on-site?</span>
      I cannot get things like, "Can you do every repair on-site?" to be underlined when hovered over.
      Code:
      #qtext:hover {
          text-decoration: underline;
      }

      Comment


      • #4
        #qtext {
        color: #3B5998;
        text-decoration: none;
        }

        The above will make the initial state NOT be underlined, where as the css above by Webdev1958 will underline when you hover over it.

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎