-1

I have an odd space I can't seem to get rid of on my site. I have spend the last few days messing with the css to try and make the #menubar cover 100% width as it is suppose to but can't work it out.

It becomes much more prominent when accessing the site via a smartphone. I am using flex slider jquery plugin for the images, but have changed it on my clients request to re size based on height rather than width.

site is http://www.testsite.co.nz/

4

4 回答 4

3

你有一个 CSS 规则:

body > div {
    padding: 2px;
}

你的标题<div>width:100%. 所以它比视口宽 4px。

于 2012-10-14T18:12:45.950 回答
1

您可能在某些东西上有边距(某些东西,例如身体默认有边距)。

最简单的方法是在谷歌浏览器中打开您的网站并检查元素,这将向您显示边距。

于 2012-10-15T05:06:49.880 回答
1

确保htmlbody设置为width: 100%

于 2012-10-14T18:12:28.450 回答
0

我改变了

<div id="logo" onclick="location.href='http://www.sgphotostudio.co.nz';" style="cursor: pointer;"></div> 

<img src="../img/SGlogo.png" onclick="location.href='http://www.sgphotostudio.co.nz';" class="main_logo">

并在下面添加了样式

#menubar img.main_logo {
    border: medium none;
    cursor: pointer;
    float: left;
    height: 76px;
    margin: 6px 0 0 200px;
}
#menu {
    float: left;
    list-style: none outside none;
    margin-top: 34px;
    width: auto;
    z-index: 10;
}
于 2012-10-14T18:48:20.303 回答