折叠< p> Firebird中的表格间距 [英] Collapsing <p> spacing in a table in Firebird

查看:76
本文介绍了折叠< p> Firebird中的表格间距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。


我在桌子上显示一些统计数据并且我已将文字放入

a< p> < td>内的标签:


< td>

< p>注1:请参阅第x列foo ...< / p>

< p>注2:参见页< a ...> 17< / a> for bar< / p>

< / td>


在Internet Explorer中查看页面时,
$ b之间的空格保留$ b段落,但段落上方和下方的空间

免除:


+ ----------- -------------------------------- +

|注1:见f列为foo ... |

| |

|注2:参见页面< a ...> 17< / a>吧... |

+ ----------------------------------- -------- +


Mozilla(Firebird 0.7),另一方面,渲染所有空间:


+ ------------------------------------------- +

| |

|注1:见f列为foo ... |

| |

|注2:参见页面< a ...> 17< / a>为酒吧... |

| |

+ ---------------------------------------- --- +


根据规格推测这是正确的行为,但是为了让Mozilla更像IE,我必须添加什么?b $ b CSS ?我是b / b
手动点击margin-top:0px;在第一个和

" margin-bottom:0px;"在第二个!


任何帮助将不胜感激。


- 伊恩。

解决方案

Iain Hallam写道:


我在表格中显示一些统计数据并且我将文本放入
< p为H. < td>内的标签:

< td>
< p>注1:请参阅第x列foo ...< / p>
< ; p>注2:参见页< a ...> 17< / a>吧< / p>
< / td>

Mozilla(Firebird 0.7),另一方面,渲染所有空间

CSS会是什么必须添加以使Mozilla更像IE吗?




td p {margin-bottom:0;}

td p:first -child {margin-top:0; margin-bottom:1em}


适应味道。注意:MSIE / Win无法解析第一个孩子。


-

Brian(按照我的地址中的说明给我发电子邮件)
http://www.tsmchughs.com/


Brian写道:

Iain Hallam写道:


我在表格中显示一些统计数据我将文本
放入< p> < td>内的标签:

< td>
< p>注1:请参阅第x列foo ...< / p>
< ; p>注2:参见页< a ...> 17< / a> for bar< / p>
< / td>


td p {margin-bottom:0;}
td p:first-child {margin-top:0; margin-bottom:1em}

适应味道。注意:MSIE / Win无法解析第一个孩子。




谢谢。有没有:最后一个孩子,如果我需要包括3个或更多的寄生虫?


+ -------------------- ------------------------- +

|注1:见f列为foo ... |

| |

|注2:参见页面< a ...> 17< / a>为酒吧... |

| |

|注3:查看网站< a ...> x< / a> for foobar ... |

+ ----------------------------------- ---------- +


- Iain。


Iain Hallam写道:

谢谢。有没有:最后一个孩子,如果我需要包括3个或更多的寄生虫?




是(CSS3并受某些浏览器支持),但为什么你需要它呢? ?

-

Anne van Kesteren

< http://www.annevankesteren.nl/>


Hi.

I''m displaying some stats in a table and I''d been putting the text into
a <p> tag inside the <td>s:

<td>
<p>Note 1: See column x for foo...</p>
<p>Note 2: See page <a ...>17</a> for bar</p>
</td>

When the page is viewed in Internet Explorer, the space between the
paragraphs is maintained, but the space above and below the paragraphs
is dispensed with:

+-------------------------------------------+
| Note 1: See column x for foo... |
| |
| Note 2: See page <a ...>17</a> for bar... |
+-------------------------------------------+

Mozilla (Firebird 0.7), on the other hand, renders all the space:

+-------------------------------------------+
| |
| Note 1: See column x for foo... |
| |
| Note 2: See page <a ...>17</a> for bar... |
| |
+-------------------------------------------+

Presumably this is correct behaviour according to the specs, but what
CSS would I have to add to get Mozilla to render more like IE? I''m
curently manually putting "margin-top: 0px;" on the first and
"margin-bottom: 0px;" on the second!

Any help would be greatly appreciated.

- Iain.

解决方案

Iain Hallam wrote:


I''m displaying some stats in a table and I''d been putting the text into
a <p> tag inside the <td>s:

<td>
<p>Note 1: See column x for foo...</p>
<p>Note 2: See page <a ...>17</a> for bar</p>
</td>

Mozilla (Firebird 0.7), on the other hand, renders all the space

what CSS would I have to add to get Mozilla to render more like IE?



td p {margin-bottom:0;}
td p:first-child {margin-top:0; margin-bottom: 1em}

adjust to taste. NB: MSIE/Win cannot parse first-child.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/


Brian wrote:

Iain Hallam wrote:


I''m displaying some stats in a table and I''d been putting the text
into a <p> tag inside the <td>s:

<td>
<p>Note 1: See column x for foo...</p>
<p>Note 2: See page <a ...>17</a> for bar</p>
</td>

td p {margin-bottom:0;}
td p:first-child {margin-top:0; margin-bottom: 1em}

adjust to taste. NB: MSIE/Win cannot parse first-child.



Thanks. Is there a :last-child if I need to include 3 or more paras?

+---------------------------------------------+
| Note 1: See column x for foo... |
| |
| Note 2: See page <a ...>17</a> for bar... |
| |
| Note 3: See site <a ...>x</a> for foobar... |
+---------------------------------------------+

- Iain.


Iain Hallam wrote:

Thanks. Is there a :last-child if I need to include 3 or more paras?



Yes (CSS3 and supported by some browser), but why would you need it here?
--
Anne van Kesteren
<http://www.annevankesteren.nl/>


这篇关于折叠&lt; p&gt; Firebird中的表格间距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆