echo '<p class="post"><h3>'.$result['title'].'</h3><object class="video" width="95%" height="55%">
<param name="movie" value="http://www.youtube.com/v/'.$match[0].'?fs=1&hl=en_US&rel=0">
</param><param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
开发者_开发技巧 <embed src="http://www.youtube.com/v/'.$match[0].'?fs=1&hl=en_US&rel=0"
type="application/x-shockwave-flash" wmode="opaque" allowscriptaccess="always"
allowfullscreen="true" width="95%" height="55%"></embed></object><p class="desc">'.$result['description'].'</p></p>';
why does .post {border-bottom:2px black solid;} displays border at the top of the paragraph?
you don't believe me, try it for urself HERE
It doesn't, you're just doing it wrong. There's no text in the <p>
node for it to be under, and you've got a bottom margin defined. See the screenshot I'm about to upload.
You shouldn't be nesting p tags. Be sure your markup is correct.
Nested p tags will render as separate p tags.
Since you have nested p tags, your markup looks like this when rendered to the browser:
<p class="post"></p>
<h3>hobotnica zajebant</h3>
<object>...</object>
<p class="desc">...</p>
<p></p>
In addition to what these fellas said. If you don't have content or a height defined of an element, it will appear just like, so it's doing what it's supposed to.
You can add a padding/margin/height
to your <p>
if you want that to appear different. Or put it on the element containing your movie, rather than the empty
精彩评论