English 中文(简体)
如何消除无意中展现的形象??
原标题:How to remove image padding that is showing up unintentionally?
  • 时间:2011-01-21 14:35:38
  •  标签:
  • html
  • css
  • web

I have three images in a container that should be stacked seamlessly, but there is some padding occurring between them.

http://www.arbitersolew.net/media/>。

左边的集装箱中的三个大吨是所涉的。

集装箱编码:

CSS

#mainBoxFull {
    background-image: url(/img/cont/mainfull.jpg);
    float: left;
    height: 560px; 
    width: 560px; 
    margin: 0px; 
    padding: 20px;
}

传真

<div id="mainBoxFull">
    <img src="/img/btns/media/bgal.jpg" alt="screenshot" width="560" height="180" border="0" />
    <img src="/img/btns/media/bvid.jpg" alt="videos" width="560" height="200" border="0" />
    <img src="/img/btns/media/bsoon.jpg" alt="coming soon" width="560" height="180" border="0" />
</div>
最佳回答

问题是,图像是一线锁。 也就是说,他们之间的空间计算在内。 这些空间是你pa的。 用途

#mainBoxFull img { display: block; }

这个问题应当消失。 或者,你可以将散射和成像元素(all<>/em>白色空间)之间的源超中白空间移走。

问题回答

解决同一问题的另一个办法是:

#mainBoxFull{ font-size:0; }

它无视双方之间的所有白色空间。 + 在你有案文的地方,你可以保持体积。





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

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

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 ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!