风格是最重要的。缩进段落不起作用

时间:2014-01-14 19:44:15

标签: html css css-specificity

我需要有关格式化问题的帮助。我希望HSC隐私地址部分的缩进量与HSC安全地址部分匹配,并且某些内容无法正常工作。我以为我已经正确设置了这些类,但是我认为某些内容超越了以前的类,我不知道如何修复它。

<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;}

2 个答案:

答案 0 :(得分:1)

您不应该将H5嵌套在P内。考虑将<p class="contact">变成<div class="contact">并查看是否适合您。不要忘记也将结束P更改为结束DIV。

否则,您可以发布截图吗?

答案 1 :(得分:1)

问题在于<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>