Extra spacing after an A Tag/img tag?(A 标签/img 标签后的额外间距?)
问题描述
您好,我正在尝试使用 div 标签构建表格单元格,同时这样做.我在单元格中添加了一个标签后,我得到了这个额外的间距.
<div 显示:行><div 显示:表格单元格><a><img/></a>我似乎无法弄清楚如何摆脱多余的间距.
我为 a 和 img 标签尝试了 display:inline.但不是运气.
如果有人可以帮助我摆脱这种间距,我将不胜感激.
示例 -- 就在阴影之前,此表格单元中有 2-3 像素的空白
解决方案 除了表格数据应该使用表格之外,我认为在图像上设置 display: block
将删除空间.如果这不起作用,请尝试制作一个 jsFiddle 页面来展示问题.
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.
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.
Example -- right before the shadowing there a 2-3 pixel white space within this tabel-cell
解决方案 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 标签后的额外间距?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:A 标签/img 标签后的额外间距?


- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- Fetch API 如何获取响应体? 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 400或500级别的HTTP响应 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01