Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/232.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 同一行上的CSS/DIV文本对齐相反_Php_Css - Fatal编程技术网

Php 同一行上的CSS/DIV文本对齐相反

Php 同一行上的CSS/DIV文本对齐相反,php,css,Php,Css,我不太清楚我是怎么把它顶起来的 如果你看一下,左项和右项的位置,右项因为任何原因都会突出,所以我认为我做错了什么。或者我的编码/css被提升了,我不完全确定编码,我只是知道它在某种程度上是“有效的”。见下文 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br /> <html xmlns="

我不太清楚我是怎么把它顶起来的

如果你看一下,左项和右项的位置,右项因为任何原因都会突出,所以我认为我做错了什么。或者我的编码/css被提升了,我不完全确定编码,我只是知道它在某种程度上是“有效的”。见下文

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"><br />
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


<title>Pretty Senshi - Sailor Moon  </title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" 
href="http://pretty-senshi.com/log/wp-content/themes/BLANK-Theme/style.css"      
type="text/css" />
<link rel="pingback" href="http://pretty-senshi.com/log/xmlrpc.php" />

</head>

<body class="home blog logged-in admin-bar">
<body>

<div id="container">

<div id="rightHalf"></div>
<div style="text-align: center;"><caption>
<img src="http://pretty-senshi.com/images/design.png"  alt="text" id="picture">
</caption></div>

<div id="wrapper"><div id="leftcolumn">
<div class="headernav">Navigation</div>
<a href="about.php">About Us<br></a>
<a href="gallery.php">Gallery<br></a>
<a href="links.php">Links In/Out</a><br>
</div>

<div id="content">
<div class="post-1 post type-post status-publish 
format-standard hentry category-uncategorized" id="post-1"></div>
<div class="header">Welcome</div>
<div class="entry">
<p>The site isn&#8217;t ready yet. This site is not ONLY dedicated to 
Sailor Moon but to all anime.</p>

<div id="commentbar">
<div class="left">left stuff</div> 
<div class="right">right stuff</div></div>

</div>

<div id="footer"></div>

</body>

</html>

我可以添加或更改什么使其与正文对齐?

这是因为您使用的是
填充:10px
#commentbar
中,只需将其删除,就可以继续了..第二,您还可以使用
填充:10px
用于CSS中的
p
,因此如果您也删除了它,这两个东西将完全对齐

填充导致对齐错误…删除此CSS声明中的填充,它将对齐

#commentbar {
  width: 100%;
  /*padding: 10px;*/
}

非常感谢:这真的很有帮助@user1816981只需再提供一个技巧来增强您的知识,学习CSS框模型
#commentbar {
  width: 100%;
  /*padding: 10px;*/
}