所以我想要完成的是坐在容器内部的<div id="box">
左侧和<div id="box2">
右侧,<div id="content">
我必须提到它们不能是位置:绝对; 除非有办法确保height:auto;
div不会失去它的高度,因为我的经验position:absolute;
似乎漂浮在其他内容之上.
这是一个直接链接,向您展示发生了什么.请记住,这是一个带有php主干的纯css布局
<div id="content">
<div id="box1">
<h2>Company Information</h2>
<img src="images/photo-about.jpg" alt="" width="177" height="117" class="aboutus-img" />
<p color="FF6600">
some content here
</p>
</div>
<div id="clear"></div>
<div id="box" style="width:350px;">
<h2>Availability</h2>
<p>
some more content here
</p>
</div>
<div id="clear"></div>
<div id="box2" style="width:350px;float:left;overflow: auto;">
<h2>Our Commitment</h2>
<p>
some content here
</p>
</div>
</div>
Run Code Online (Sandbox Code Playgroud) 我正在尝试从C#中当前用户的appdata文件夹中的文件中读取,但我还在学习,所以我有这个:
int counter = 0;
string line;
// Read the file and display it line by line.
System.IO.StreamReader file = new System.IO.StreamReader("c:\\test.txt");
while ((line = file.ReadLine()) != null)
{
Console.WriteLine(line);
counter++;
}
file.Close();
// Suspend the screen.
Console.ReadLine();
Run Code Online (Sandbox Code Playgroud)
但我不知道输入什么以确保它始终是当前用户的文件夹.