Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何从post图像中删除不需要的左边距/填充?_Html_Css_Margin_Padding_Blogger - Fatal编程技术网

Html 如何从post图像中删除不需要的左边距/填充?

Html 如何从post图像中删除不需要的左边距/填充?,html,css,margin,padding,blogger,Html,Css,Margin,Padding,Blogger,我对整个HTML和CSS都是新手,所以请提前为我的无俱乐部表示歉意!我一直在尝试将我的帖子图像与我博客上的文本对齐,但失败了:内容正文是600像素宽,我的图片也是如此,但它们略微缩进,因此右侧被切掉了一点。我已经成功地把其他一切都安排好了,但不是这些 .post{ width:100%; height:auto; padding:0; margin:5px 0 30px; border-bottom:none; } .post-body{ margin:0 0 .75em

我对整个HTML和CSS都是新手,所以请提前为我的无俱乐部表示歉意!我一直在尝试将我的帖子图像与我博客上的文本对齐,但失败了:内容正文是600像素宽,我的图片也是如此,但它们略微缩进,因此右侧被切掉了一点。我已经成功地把其他一切都安排好了,但不是这些

.post{
  width:100%;
  height:auto;
  padding:0;
  margin:5px 0 30px;
  border-bottom:none;
}
.post-body{
  margin:0 0 .75em;
  line-height:1.6em;
  font-size:11px;
  font-family:Arial;
  text-align:justify;
}
.post h3{
  font-size:30px;
  margin:0;
  padding:5px 0;
  text-align:left;
  font-family:Yanone Kaffeesatz, sans-serif;
  text-transform:uppercase;
}
.post img{
  padding:0;
  min-width:600px;
}
.thumbs img{
  margin-left:0px;
}
.post-footer-line-1,.post-footer-line-2,post-footer-line-3,.post-footer{
  display:none;
}

我想说,这可能是显而易见的,但它让我不知所措。如果您需要更多信息,请告诉我!非常感谢您的帮助!(:

查看您的网站,我发现图像周围有一个带有内联样式的a标签:

<a href="[...]" style="margin-left: 1em; margin-right: 1em;">
    <img border="0" src="[...]">
</a>


因此,删除内联样式也会删除边距:)

我认为这种样式设置是您的问题

style=“左边距:1em;右边距:1em;”

当我关闭它们时,图像移到了右侧,出现了被切断的部分。

style=“margin left:1em;margin right:1em;”可以固定为
无。有关详细信息,请参见。

您可能需要注意,这是因为内联样式始终优先于样式表中的样式。感谢您的快速回答!很抱歉我完全忘记了,但是删除内联样式的最佳方法是什么?S:我想这些样式是来自你的模板还是通过图片库的插件?!正如我所看到的,它们现在已经在你的源代码中消失了。。。