项目符号列表的边距/填充.. [英] margins/padding for bulleted lists..

查看:91
本文介绍了项目符号列表的边距/填充..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个问题与项目符号列表..你知道FF和IE做差异

边距/间距这些,所以必须做的事情如


/ * IE:* /

* html ul.headlines {margin-left:20px;边距:0像素; }


/ * FF:* /

htmlbody ul.headlines {margin-left:-20px;边距:0像素; }

两个问题:


1)它在IE6中看起来与IE7差异

2)浏览器特定的hack ;由于某种原因,这里不起作用..

代码仅适用于FF,由IE取而代之,反之亦然...


这是一个在一个相当小的空间(约250 x 300 ..)的项目符号列表

因此需要做非常具体的间距..


会很感激建议..谢谢你...



I''m having a problem w/bulleted lists.. as you know FF and IE do diff
margins/spacing for these, so have to do stuff like

/* IE: */
* html ul.headlines {margin-left:20px; margin-top:0px; }

/* FF: */
htmlbody ul.headlines {margin-left:-20px; margin-top:0px; }
two problems:

1) it looks diff in IE6 from IE7
2) the browser-specific "hack" for some reason is not working here..
code meant only for FF is picked up by IE and vice-versa...

this is for a bulleted list in a fairly small space (approx 250 x 300..)
so need to do very specific spacing..

would appreciate suggestions.. thank you..


推荐答案

maya schrieb:
maya schrieb:
$ b $


我有一个问题,带有项目符号列表..你知道FF和IE确实差异

这些边距/间距,所以必须做的事情如


/ * IE:* /

* html ul.headlines {margin-left:20px;边距:0像素; }


/ * FF:* /

htmlbody ul.headlines {margin-left:-20px;边距:0像素; }


I''m having a problem w/bulleted lists.. as you know FF and IE do diff
margins/spacing for these, so have to do stuff like

/* IE: */
* html ul.headlines {margin-left:20px; margin-top:0px; }

/* FF: */
htmlbody ul.headlines {margin-left:-20px; margin-top:0px; }



您是否同时尝试了margin_ left _and_ padding-left for ul _and_ li?


-

Johannes Koch

in te domine speravi;非永久性的东西。

(Te Deum,4美分。)

Did you try both margin-left _and_ padding-left for both ul _and_ li?

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


maya写道:
maya wrote:

我有一个问题与/项目符号列表..你知道FF和IE做差异

边距/间距这些,所以必须做的事情,如


/ * IE:* /

* html ul.headlines {margin-left:20px;边距:0像素; }


/ * FF:* /

htmlbody ul.headlines {margin-left:-20px;边距:0像素; }


两个问题:


1)它在IE6中从IE7看起来差异
I''m having a problem w/bulleted lists.. as you know FF and IE do diff
margins/spacing for these, so have to do stuff like

/* IE: */
* html ul.headlines {margin-left:20px; margin-top:0px; }

/* FF: */
htmlbody ul.headlines {margin-left:-20px; margin-top:0px; }
two problems:

1) it looks diff in IE6 from IE7



是的,因为它们是不同的浏览器。

参见 http://msdn.microsoft.com/en-us/library/bb250496.aspx ,特别是

" * HTML Filter"和html body子选择器过滤器部分。

Yes, because they''re different browsers.
See http://msdn.microsoft.com/en-us/library/bb250496.aspx, especially
the "* HTML Filter" and ""html body" child selector filter" sections.


2)浏览器特定的hack部分。由于某种原因,这里不起作用..

代码仅适用于FF,由IE取而代之,反之亦然......
2) the browser-specific "hack" for some reason is not working here..
code meant only for FF is picked up by IE and vice-versa...



查看边距和填充。

Look at both margin and padding.


>

这是一个相当小的空间中的项目符号列表(大约250 x 300。 。)

所以需要做非常具体的间距..
>
this is for a bulleted list in a fairly small space (approx 250 x 300..)
so need to do very specific spacing..



我希望你知道文本可能溢出你的250px或300px

空间。


HTH


-

John

思考UIP的价值: http://improve-usenet.org /


Johannes Koch写道:
Johannes Koch wrote:

maya schrieb:
maya schrieb:

>

我有一个问题与/项目符号列表..你知道FF和IE确实差异
边距/间距为这些,所以必须做凝灰岩像

/ * IE:* /
* html ul.headlines {margin-left:20px;边距:0像素; }

/ * FF:* /
htmlbody ul.headlines {margin-left:-20px;边距:0像素; }
>

I''m having a problem w/bulleted lists.. as you know FF and IE do diff
margins/spacing for these, so have to do stuff like

/* IE: */
* html ul.headlines {margin-left:20px; margin-top:0px; }

/* FF: */
htmlbody ul.headlines {margin-left:-20px; margin-top:0px; }



您是否同时尝试了margin _ left _and_ padding-left for ul _and_ li?


Did you try both margin-left _and_ padding-left for both ul _and_ li?



实际上这终于奏效了:


保证金:7px 0px 15px 0px;填充:0px 0px 0px 20px;


在所有三种浏览器中看起来都不错,甚至不需要执行

浏览器特定的黑客攻击.. ..;)


非常感谢你...

actually this finally worked:

margin:7px 0px 15px 0px; padding:0px 0px 0px 20px;

looks decent in all three browsers, and didn''t even have to do the
browser-specif hack....;)

thank you very much...


这篇关于项目符号列表的边距/填充..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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