A标记/ img标记后的额外间距? [英] Extra spacing after an A Tag/img tag?

查看:99
本文介绍了A标记/ img标记后的额外间距?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我试图建立一个表格单元格使用div标签,而这样做。我在单元格中的img标签之后得到这个额外的间距。

Hello i'm trying to build a table cell using div tag and while doing so. i get this extra spacing after my img a tag within the cell.

<div display:table>
 <div display:row>
  <div display:tabel-cell>
   <a><img/></a>

我似乎无法找出如何摆脱额外的间距。

I can't seem to figure out how to get rid of that extra spacing.

我试图显示:inline的a和img标签。但不幸运。

i tried display:inline for the a and img tag. yet not luck.

如果任何人可以帮助我摆脱这个间距,我会很高兴地欣赏它。

if anyone can help me get rid of this spacing i would gladly appreciate it.

在阴影之前,这个tabel-cell内有2-3像素的空格。

Example -- right before the shadowing there a 2-3 pixel white space within this tabel-cell

推荐答案

你应该使用表格数据,我认为在图像上设置 display:block 将删除空格。如果这不工作,尝试做一个jsFiddle页面来显示问题。

Aside from the fact that you should use tables for tabular data, I think that setting display: block on the image will remove the space. If that doesn' work, try to make a jsFiddle page to show off the problem.

这篇关于A标记/ img标记后的额外间距?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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