边距/填充问题 - 中级 CSS 学生
我试图弄清楚填充是否可以调整,这里
是 HTML:
<div id="branding">
<h1>
{block:IfHeaderImage}<a href="/"><img src="{image:Header}" alt="{Title}" /></a> {/block:IfHeaderImage}
{block:IfNotHeaderImage}<a href="/">{Title}</a>{/block:IfNotHeaderImage}
</h1>
</div><!-- #branding -->
以及相关的 CSS:
#header #branding {
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
margin: 0 auto 3px;
{block:IfNotHeaderImage}padding: 40px 0;{/block:IfNotHeaderImage}
width: 900px;
}
我尝试过:添加高度属性并更改填充,但没有任何效果。这是在 Tumblr(此网站)中完成的,而且有点挑剔。
非常感谢任何帮助!
I'm trying to figure out if the padding is adjustable in this
Here's the HTML:
<div id="branding">
<h1>
{block:IfHeaderImage}<a href="/"><img src="{image:Header}" alt="{Title}" /></a> {/block:IfHeaderImage}
{block:IfNotHeaderImage}<a href="/">{Title}</a>{/block:IfNotHeaderImage}
</h1>
</div><!-- #branding -->
And the associated CSS:
#header #branding {
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
margin: 0 auto 3px;
{block:IfNotHeaderImage}padding: 40px 0;{/block:IfNotHeaderImage}
width: 900px;
}
I tried: adding a height property and changing the padding, but nothing worked. This is being done in Tumblr (this site), and it has been a bit finicky.
Any help much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Chrome 中没问题。请参阅屏幕截图:http://cl.ly/3z2c3D18291K260s2D1K
It's fine in Chrome. See screenshot: http://cl.ly/3z2c3D18291K260s2D1K