滑出菜单激活时宽度更改

时间:2014-07-30 03:49:14

标签: jquery css

http://derp.club/scribbles/

我在上面设置了该网站,我的问题是,每当我点击顶部的滑出菜单,然后再次单击它关闭时,您可以看到内容的宽度发生变化(带黑色的框)边界)。我已经确定它是一个宽度百分比问题,但没有将宽度设置为固定值,我无法解决问题。但是,我仍然希望内容的宽度能够响应,所以我希望有人能指出我的方向来解决这个问题。

.content {
width: 100%;
padding: 0;
margin: 0;
text-align: left;
position: absolute;
top: 5%;
left: 0px;  
}

这似乎是导致问题的代码的一部分。

谢谢!

2 个答案:

答案 0 :(得分:0)

将开放课程添加到.mm-page

时,您需要更改.mm-menu的宽度
.mm-menu {
    width: 30%; <!-- allow it to take 30 % of total 100% document width -->
}

.mm-page {
    margin: 0;
    top: 0;
    width: 70%; <!-- rest (100 - 30) of width -->
    right: 0;
    bottom: 0;
    left: 30%;  <!-- leave the 30% margin for side nav bar -->
}
h1 {
    line-height: normal !important <!-- rest the line height here -->
} 

答案 1 :(得分:-1)

您的 CSS类 - [.intentinside,.contentinsider] 使用填充为5%,在转换时会有所不同,您应该在px中使用它们。而且,为了响应,您必须进行媒体查询。