html - 风格是压倒一切的。缩进段落不起作用

标签 html css css-specificity

我需要格式问题方面的帮助。我希望 HSC 隐私地址部分的缩进量与 HSC 安全地址部分匹配,但有些地方不正常。我以为我的类(class)设置正确,但我认为有些东西覆盖了之前的类(class),我不知道如何修复它。

<link href="../privacy/internal/css/turquoise.css" media="screen" rel="stylesheet"    type="text/css" />
    <!--HSC Compliance Office webpage starts here-->

    <link rel="stylesheet" href="complianceCSS.css">
    <h1 class="allpages">HIPAA</h1>

    <div id="hipaa">

    <div class="privacy">
    <!--HIPAA PRIVACY HEADER html-->
    <h4>HIPAA Privacy</h4>
    <img class="computer" alt="computer" src="computer.jpg" height="167">
    <p>The federal Health Insurance Portability and Accountability Act of 1996 <b>
    (&#8220;HIPAA&#8221;)</b>&#160;protects the&#160;<a href="http://www.hhs.gov   /ocr/privacy/hipaa/administrative/privacyrule/index.html" 
title="Privacy Rule">privacy</a>&#160;and confidentiality of an individual's health information.&#160; Known as &#8220;protected 
health information&#8221; or &#8220;PHI&#8221;, the health information <b>generally&#160;</b>cannot be used or disclosed unless
 the individual who is the subject of the PHI has given prior written&#160;
    <a href="http://hsc.unm.edu/admin/privacy/docs/Authorization to 
 Use and Disclose Health Information_1.pdf" title="Authorization">authorization</a>&#160;or permission.</p>
    <p>For more information about Privacy issues at the University of New Mexico please contact the  
 <a href="http://hsc.unm.edu/admin/privacy/index.html "
 target="_blank" title="Privacy Office">Privacy Office</a>
<p class="contact">
<h5 style="text-decoration:underline;>Physical Location:</h5><br>
University of New Mexico, North Campus
 <br>Basic Research Facility "BRF", Room B23B<br>
 <br>
 Mailing Address:</h5>
 <br>University of New Mexico
 <br>Health Sciences Center
 <br> 1 University of New Mexico
 <br>

 <br>Phone: (505) 272-1521
 <br>Fax: (505)272-2461
 <br><a href="mailto:privacy@salud.unm.edu">privacy@salud.unm.edu</a>
 </p>
 <p>
 </div>
 <div class="security">
 <!--HIPAA SECURITY HEADER html-->
 <h4>HIPAA Security</h4>
 <p>The 
 <a href="docs/secfacts.pdf">
Security Rule Fact Sheet</a>&#160;sets standards for the security of electronic health   information (ePHI).
 Published in 2003, it defines a series of administrative, technical, and physical    security procedures for
  covered entities to use to ensure the confidentiality of ePHI.</p>
<p>For more information about Security issues at the University of New Mexico please contact: 
<p class="contact">
<a href="http://hsc.unm.edu/admin/privacy/index.html "target="_blank" title="HSC Security Office">HSC Security Office</a>
<br>Barney Metzner 
<br>HSC Information Security Officer
<br>(505) 272-1696
<br><a href="mailto:HSC-ISO@salud.unm.edu">ISO@salud.unm.edu</a>
</p>
</div>

 </div>

CSS:

#hipaa {background-color: #eeeeee; width: 655px;  border: solid; border color:#e9e9e9;margin-left: auto; margin-right: auto;}
.computer {float: right; margin: 0px 20px 5px 20px;}
.privacy {padding: 25px 0px 5px 40px;}
.contact{padding: 0px 20px  0px 40px;}
.security{padding: 10px 20px 20px 40px;}

最佳答案

问题在于 <h5>标签嵌套在您的 <p class="contact"> 中标签。在不更改任何其他语法的情况下,您可以移动 <h5><p> 之上此 JSFiddle 中演示的标记:http://jsfiddle.net/hJHRT/

代码示例:

<h5 style="text-decoration:underline;">Physical Location:</h5>

<p class="contact">
    University of New Mexico, North Campus<br>
    Basic Research Facility " BRF ", Room B23B<br><br>

    Mailing Address:<br>
    University of New Mexico<br>
    Health Sciences Center<br>
    1 University of New Mexico<br><br>

    Phone: (505) 272-1521<br>
    Fax: (505)272-2461<br>
    <a href="mailto:privacy@salud.unm.edu ">privacy@salud.unm.edu</a>
</p>

关于html - 风格是压倒一切的。缩进段落不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21122541/

相关文章:

html - 我可以为 "grid-column"设置动画吗?

css - 覆盖伪元素子元素的最佳方法(例如,:before)

jQuery : alternate row colour in table except cell with class to keep background colour

javascript - 如何做一个计数器计时器,它在结束时会显示一个 div,它会保持一段时间并再次重新启动

javascript - 隐藏滚动条并使用 CSS 向左向右滑动

css - 相邻的 div 在 Safari 中显示 1px 的间隙,但在其他浏览器中没有

jquery - 找到显示为 : block 的最后一个可见 div

CSS ID 变体

Css 特异性 :last-child

html - 排序触控笔内容