简体   繁体   English

从div包含在<a>标签</a>中的div内的文本中删除下划线

[英]Remove the Underline from text inside a div where the div is enclosed in <a> tags

I am currently formatting alongside using jquery UI. 我目前正在使用jquery UI进行格式化。 I have a div that has the "ui-state-error" class and the text within it has the "ui-state-error-text" class. 我有一个具有“ ui-state-error”类的div,并且其中的文本具有“ ui-state-error-text”类。 Here is my code: 这是我的代码:

<div class="ui-widget">
     <a href="http://www.mobilehealtherecords.com/blog/news-announce/2014/06/faq-
     page/" target="_newtab" style="font-decoration: none">
          <div class="ui-state-error ui-corner-all" id="questionAlert" style=
          "margin: auto">
               <p class="ui-state-error-text"><span class="ui-icon ui-icon-alert" 
               style="float: left; margin-right: .3em;"></span><span style="
               color: font-weight: bold">Alert:</span> The "questions" page has
               been permanently removed. Click here for more information.</p>
          </div>
     </a>
</div>

I don't want to list all the different resources I am using, so I am including a jsfiddle . 我不想列出我正在使用的所有不同资源,所以我包括了jsfiddle What I am trying to do is eliminate that annoying blue underline. 我想做的是消除烦人的蓝色下划线。 If you notice I have already tried to remove it from the tag by inserting a Style with text-decoration: none. 如果您注意到我已经尝试通过插入带有文本装饰的样式从标签中将其删除:无。

I updated your fiddle and removed jQuery UI references for simplicity. 为了简化,我更新了小提琴并删除了jQuery UI参考。

jsFiddle 的jsfiddle

Just added the following CSS rule 刚刚添加了以下CSS规则

a {
    text-decoration: none;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM