IE无法在IMG上添加填充? [英] IE cannot put padding on IMGs?
问题描述
我正在尝试使用padding-right
样式向IMG添加一些简单的填充,但它在IE中不起作用。但是在Mozilla和Opera中运行良好。
这里是显示此IE问题页面的链接:
http://home.comcast.net/~delerious1/index12.html
我知道我可以通过将填充更改为
margin-right来解决IE中的问题,但是当鼠标结束时无法单击链接
保证金面积。所以我真的想让填充在IE中工作。任何
想法?
于2003年12月21日在comp.infosystems上写道。 www.authoring.stylesheets:我正在尝试添加一些简单的使用
padding-right样式填充到IMG,但它在IE中不起作用。但是在Mozilla
和Opera中工作正常。
填充是恕我直言,在容器及其内容之间放置一个间距。
但是img不是一个容器,所以IE不构建它。
这就像填充一串字母而不是它的容器。
+++你不能在它周围填充(?)某些东西,
填充是一项内部工作。 +++
如果你想在图像上填充图像,那就称为边距。
< span style =" padding:3px;" >< img src =" ..">< / span>
与
<相同; img style =" margin:3px;" src =" ..">
所以永远不要对img和容器使用相同的类,如果你想使用
的东西ike padding in它。
-
Evertjan。
荷兰。
(请更改x 我的电子邮件地址中的点数
Evertjan。写道:
填充是恕我直言,在容器及其内容之间放置一个间距。
但是img不是容器,所以IE不构建它。
填充是边框和内容之间的间距。保证金是
元素的总宽度(宽度+填充+边框)之间的间距
和容器。
+++你不能padd(?)周围的东西,
填充是一个内部工作。 +++
这是不正确的。特别是对于图像,W3C盒子模型是有意义的。
如果你想在图像上填充图像,那就称为边距。
再次,不正确。
所以永远不要使用相同的类img和容器,如果你想使用其中的填充物。
:?
-
Anne van Kesteren
< http ://www.annevankesteren.nl/>
< de ******* @ no.spam.com>在消息中写道
news:3f ************** @ news.md.comcast.giganews.com ...I我试图通过使用padding-right
样式向IMG添加一些简单的填充,但它在IE中不起作用。在Mozilla和Opera中运行良好,但是
。
这里是显示此IE问题页面的链接:
http://home.comcast.net/~delerious1/index12.html
我知道我可以通过将填充权改为右边缘来解决IE中的问题,但是当鼠标超过
那个边距区域时,无法点击链接。所以我真的想让填充在IE中工作。
有什么想法吗?
问题在于尝试将A元素显示为BLOCK而
包括图像作为一部分的链接。从你的
其他问题中查看我之前的例子。有更好的答案我肯定但是我得到了相同的信息
IE6和Mozilla中的
输出,Opera是另一个故事...
I''m trying to add some simple padding to an IMG by using a padding-right
style, but it doesn''t work in IE. Works fine in Mozilla and Opera, though.
Here''s a link to a page which displays this IE problem:
http://home.comcast.net/~delerious1/index12.html
I do know that I can solve the problem in IE by changing padding-right to
margin-right, but then the links cannot be clicked when the mouse is over that
margin area. So I would really like to get the padding working in IE. Any
ideas?
wrote on 21 dec 2003 in comp.infosystems.www.authoring.stylesheets:I''m trying to add some simple padding to an IMG by using a
padding-right style, but it doesn''t work in IE. Works fine in Mozilla
and Opera, though.
Padding is IMHO putting a spacing between a container and its contents.
But an img is NOT a container, so IE is right not to construct that.
It is like padding a string of letters instead of its container.
+++ You cannot padd(?) something around itself,
padding is an inside job. +++
If you want padding AROUND an image, that is called a margin.
<span style="padding:3px;"><img src=".."></span>
is about the same as
<img style="margin:3px;" src="..">
so never use the same class for img and containers, if you want to use
things ike padding in it.
--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)
Evertjan. wrote:
Padding is IMHO putting a spacing between a container and its contents.
But an img is NOT a container, so IE is right not to construct that.
It is like padding a string of letters instead of its container.
Padding is spacing between the border and the contents. Margin is
spacing between the total width (width+padding+border) of the element
and the container.
+++ You cannot padd(?) something around itself,
padding is an inside job. +++
That is incorrect. Especially for images the W3C box model makes sense.
If you want padding AROUND an image, that is called a margin.
Again, incorrect.
so never use the same class for img and containers, if you want to use
things ike padding in it.
:?
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
<de*******@no.spam.com> wrote in message
news:3f**************@news.md.comcast.giganews.com ...I''m trying to add some simple padding to an IMG by using a padding-right
style, but it doesn''t work in IE. Works fine in Mozilla and Opera, though.
Here''s a link to a page which displays this IE problem:
http://home.comcast.net/~delerious1/index12.html
I do know that I can solve the problem in IE by changing padding-right to
margin-right, but then the links cannot be clicked when the mouse is over that margin area. So I would really like to get the padding working in IE. Any ideas?
The problem lies in trying to make the A element display as BLOCK while
including an image as part of the link. See my previous examples from your
other questions. There are better answers i''m sure but I get identicle
output in both IE6 and Mozilla, Opera is another story...
这篇关于IE无法在IMG上添加填充?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!