English 中文(简体)
CSS:职位:职位 相对,但不影响父母?
原标题:CSS: position:absolute inside position:relative, but not affecting parent?
  • 时间:2010-04-06 22:54:49
  •  标签:
  • css
<style>
.special p { display:none; }
.special:hover p { display:block; }
</style>

<table>
  <tr>
    <td style="width:200px">Things</td>
    <td style="position:relative; width:220px">
      <div style="position:absolute;right:0" class="special">
        <img id="shows" />
        <p>Variable width upto, say 600px (Will be hidden until this td is :hovered</p>
      </div>
    </td>
  </tr>
  <tr>
    <td style="width:200px">Things</td>
    <td style="position:relative; width:220px">
      <div style="position:absolute;right:0" class="special">
        <img id="shows" />
        <p>Variable width upto, say 600px (Will be hidden until this td is :hovered</p>
      </div>
    </td>
  </tr>
</table>

我能否做这项工作? e. 我能否将<条码>#special p扩大至情况之首? 由于我目前设立了<代码>#special。 在220 px宽的拖网外,也取得了一定的进展。 任何想法?

最佳回答

我仍然不清楚,但试图这样做。 这将使贸发会议在显示内容时能够增长。

<table>
  <tr>
    <td style="width:200px">Things</td>
    <td style="text-align: right;">
      <div class="special">
        <img id="shows" />
        <p>Variable width upto, say 600px (Will be hidden until this td is :hovered</p>
      </div>
    </td>
  </tr>
</table>
问题回答

I m 不是100%确保你想要达到的目标,而是放弃<代码>: from the td,并订立.special p s : final,但不是specials本人?

这样,您的<代码>特殊要素将载于正常的表格流中,而封顶的段落将离开表层。





相关问题
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: ...

热门标签