English 中文(简体)
如何保持四舍五入的高度,等于其内各点的高度。
原标题:how to keep the height of the div equal to the union of the height of elements inside it
  • 时间:2010-05-30 12:16:04
  •  标签:
  • css

我一直在做一个文字压缩模板。 i 在某些地方 st......

问题在于:

• tag子和 im子的大小......

i) 看到,干 the只能够控制tag,而控制着 flows。

i 我的法典如下:

<div>
<p> some contents <img src="an_image"/> some morecontent</p>
<div>

基本想要的是:

div height = <p> height U(union) <img> height

但是,实际上正在得到的是:

div height = <p> height; while <img> over flows

i have already checked for similar questions on Stack Overflow but was not able to find one which solves a similar problem.. please give me some idea..

更新:

这是我的法典:

<div id="the_content">
    <p><img class="alignright" src="http://i35.tinypic.com/990wtx.png" alt="WordPress Logo" align="right" />Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur quam augue, vehicula quis, tincidunt vel, varius vitae, nulla. Sed convallis orci. Duis libero orci, pretium a, <a href="#">convallis quis</a>, pellentesque a, dolor. Curabitur vitae nisi non dolor vestibulum consequat.  <a href="http://localhost/wordpress/?p=55#more-55" class="more-link">(more&#8230;)</a></p>
</div>
最佳回答

你没有显示你们的社保局,但像你一样,在四肢内树立了形象。 您不妨在<代码><p>之后尝试进行信息交换。 或者,newer Solutions ,详见Qurksmode。

问题回答

如果你没有具体说明高点,那就将围绕其中的所有要素进行总结,那么你为什么要具体说明高点?





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...

热门标签