我正在网站上工作。我希望大图像(900px宽度)覆盖整个容器。目前有一点填充拖曳右侧,我无法修复。请帮帮我。
<!DOCTYPE html>
<html id="index-page" class="canvas canvastext no-touch draganddrop rgba borderradius boxshadow textshadow opacity fontface video audio localstorage mobile-768 mozilla wordpress-section w-900 lt-960 js gradient rgba opacity textshadow multiplebgs boxshadow borderimage borderradius no-cssreflections csstransforms csstransitions fontface not-ie domloaded" lang="en-US" dir="ltr">
<head>
<body id="home" class="home blog">
<div id="wrap" style="">
<header role="banner">
<section id="site-logo">
<a href="http://ackmaster.com/wordpress">
<img width="1200px" alt="Ackmaster.com" src="http://ackmaster.com/wordpress/wp-content/uploads/2011/12/WebSiteMain2.jpg">
</a>
</section>
<section id="nav-wrap">
</header>
<div id="content" role="main">
<footer style="min-height: 0; padding-top: 0;" role="contentinfo">
</div>
<script>
<div id="fancybox-tmp"></div>
<div id="fancybox-loading">
<div id="fancybox-overlay"></div>
<div id="fancybox-wrap">
</body>
</html>
使用firebug相关的CSS是:
body, button, input, select, textarea {
color: #8E8E8E;
}
dark.css (line 7)
body {
background-image: url("bg-base.jpg");
}
dark.css (line 6)
body {
min-width: 480px;
}
mobile.css (line 6)
body {
background: url("../images/bg-base.jpg") repeat scroll 0 0 transparent;
}
layout.css (line 7)
body, button, input, select, textarea {
color: #3F3F3F;
font-family: "Helvetica Neue",Arial,sans-serif;
}
boilerplate.css (line 37)
body {
font-size: 13px;
line-height: 1.6;
margin: 0;
}
boilerplate.css (line 35)
Inherited fromhtml#index-page.canvas
html {
font-size: 100%;
}
boilerplate.css (line 33)
答案 0 :(得分:1)
样式表“layout.css”的标识为padding: 0 30;
的div为#wrap
。这就是您的图像所处的div。填充影响图像的左侧和右侧。将其设置为padding-left: 30px;
以保留左侧填充并移除右侧。
答案 1 :(得分:0)
<body id="home" class="home blog" style="margin: 0px;">
您需要使用CSS将正文边距更改为0px。