简体   繁体   English

包括PHP页面的内容到另一个

[英]Including content of php page into another

I know what to use and how. 我知道该使用什么以及如何使用。 Here is my script: 这是我的脚本:

<html>
<body>

<div style="top:230px; right:50px">  // Style does not work
<?php include 'index.php'; ?>
</div>

<h1>Welcome to my home page.</h1>
<p>Some text.</p>

</body>
</html>

index.php contains this page: index.php包含以下页面:

http://yepinol.com/wall/ http://yepinol.com/wall/

I want to place this content as specifi height, and location on the page. 我想将此内容作为指定的高度和位置放在页面上。 For that I added style as above. 为此,我添加了上述样式。 But it's height and left right position does not change? 但是它的高度和左右位置不改变?

Why? 为什么? index.php - source code of index.php index.php-index.php的源代码

for top css attribute you need to add position . 对于顶部 CSS属性,您需要添加position It has no effect on non-positioned elements.So do, like: 它对未定位的元素没有影响,所以这样做,例如:

position: relative;

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

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