我有三个div元素:一个作为标题,一个作为页脚,以及一个中心内容div.
将div在中心需要与内容自动扩展,但我想一个min-height,使得底部div总是至少到达窗口的底部,但在较长的网页是不是固定在那里.
例如:
<div id="a" style="height: 200px;">
<p>This div should always remain at the top of the page content and should scroll with it.</p>
</div>
<div id="b">
<p>This is the div in question. On longer pages, this div needs to behave normally (i.e. expand to fit the content and scroll with the entire page). On shorter pages, this div needs to expand beyond its content to a height such that …Run Code Online (Sandbox Code Playgroud) 所以我试图用PHP发送一个相当简单的HTML电子邮件.我花了最近三天试图找到一个好的解决方案,并认为我找到了一个,但是当我测试它时,它没有正确发送.我从我引用的其中一个教程中借用了这段代码.测试代码如下:
<?php
//define the receiver of the email
$to = 'myemail@gmail.com';
//define the subject of the email
$subject = 'Test HTML email';
//create a boundary string. It must be unique
//so we use the MD5 algorithm to generate a random hash
$random_hash = md5(date('r', time()));
//define the headers we want passed. Note that they are separated with \r\n
$headers = "From: webmaster@example.com\r\nReply-To: webmaster@example.com";
//add boundary string and mime type specification
$headers .= "\r\nContent-Type: multipart/alternative; boundary=\"".$random_hash."\"";
//define the body of the …Run Code Online (Sandbox Code Playgroud)