网站右侧的空间

时间:2012-10-14 18:06:52

标签: jquery html css

我有一个奇怪的空间,我似乎无法摆脱我的网站。我花了最后几天搞乱css试图让#menubar覆盖100%宽度,因为它是假设但无法解决它。

通过智能手机访问网站时,它变得更加突出。我正在为图像使用flex滑块jquery插件,但已根据我的客户要求更改它,以根据高度而非宽度重新调整大小。

网站是http://www.testsite.co.nz/

4 个答案:

答案 0 :(得分:3)

你有一个CSS规则:

body > div {
    padding: 2px;
}

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

答案 1 :(得分:1)

确保htmlbody设置为width: 100%

答案 2 :(得分:1)

你可能在某些事情上有一些余地(默认情况下身体有一些边缘)。

最简单的方法是在Google Chrome中打开您的网站并检查元素,这会显示边距。

答案 3 :(得分: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;
}