我对HTML有点生疏,我的测试网站样式代码遇到了问题。我在<h4>
标记后得到一个非常奇怪的缩进,我不确定问题是什么。我将包含整个div和屏幕截图,以便更好地排除故障。
div style="color: #777;background-color:white; text-align: justify; margin-left: 20px; margin-right: 20px;">
<h1 style= "text-align: center;"> My Experience</h1>
<span>
<h4 style= "text-align: right;">April 2014- Present</h4>
<h4>General Motors</h4>
<h5>Senior Program Manager</h5>
<p>
<ul>
<li>
End to end responsibility for the success of
the critical global IT projects that will evolve and transform
GM’s business processes and capabilities.
</li>
<li>
Management of the IT project life cycle from definition to deployment,
through engagement with senior GM leaders, cross-functional stakeholders,
and development teams
</li>
</ul>
</p>
<p>
<h4 style= "text-align: right;">May 2012- March 2014</h4>
<h4>Xtivia, INC</h4>
<h5>PMO Manager</h5>
<ul>
<li>
Provided direct leadership, organization and coordination to drive the delivery of complex portal implementations to customers in multiple sectors.
</li>
<li>
Guided project stakeholders in defining requirements, project scope and ensuring the effective utilization of team members.
</li>
<li>
Managed PMO’s functional activities, encompassing program planning, personnel management and product delivery.
</li>
</ul>
</p>
<h4 style = "float: left;">University of Nebrasksa - Omaha</h4><h4 style= "float: right;">June 2010 - Present</h4>
</br>
<h5>Adjunct Professor</h5>
<p>
Instructor for undergraduate Project Management and Cyber Ethics courses.
</p>
<span><h4 style= "float: left;">Bellevue University</h4><h4 style= "float: right;">June 2010 - Present</h4></span>
<br>
<h5>Adjunct Professor</h5>
<p>
Instructor for graduate and undergraduate Computer Information Systems and Management Information Systems courses.
</p>
</span>
我确信它很简单,但就像我之前说过的那样,我生锈了。)
答案 0 :(得分:-1)
这是您的代码的正确(大部分)版本
h1 {
text-align: center;
}
h2 {
font-size: 1.2em;
}
h2 span {
float: right;
font-size: 0.75em;
}
#container {
color: #777;
text-align: justify;
margin: 0 2em;
}
<div id="container">
<h1>My Experience</h1>
<h2>General Motors <span class="date">April 2014- Present</span></h2>
<h3>Senior Program Manager</h3>
<ul>
<li>End to end responsibility for the success of
the critical global IT projects that will evolve and transform
GM’s business processes and capabilities.
</li>
<li>
Management of the IT project life cycle from definition to deployment,
through engagement with senior GM leaders, cross-functional stakeholders,
and development teams
</li>
</ul>
<h2>Xtivia, INC <span class="date">May 2012- March 2014</span></h2>
<h3>PMO Manager</h3>
<ul>
<li>
Provided direct leadership, organization and coordination to drive the delivery of complex portal implementations to customers in multiple sectors.
</li>
<li>
Guided project stakeholders in defining requirements, project scope and ensuring the effective utilization of team members.
</li>
<li>
Managed PMO’s functional activities, encompassing program planning, personnel management and product delivery.
</li>
</ul>
<h2>University of Nebrasksa - Omaha <span class="date">June 2010 - Present</span></h2>
<h3>Adjunct Professor</h3>
<p>
Instructor for undergraduate Project Management and Cyber Ethics courses.
</p>
<h2>Bellevue University <span class="date">June 2010 - Present</span></h2>
<h3>Adjunct Professor</h3>
<p>
Instructor for graduate and undergraduate Computer Information Systems and Management Information Systems courses.
</p>
</div>