菜单按钮停止工作

时间:2014-11-20 12:51:32

标签: html css responsive-design concrete5

我将我的网站转换为具体的5模板。现在,当我使浏览器窗口变小(小于480px)时,menubutton停止工作。你不能点击它..否则主题工作正常..任何可能的解决方案?

Concrete5标题代码html:

<!-- ervoor zorgen dat ons bestand in concrete5 aan het runnen is -->
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- titel van de website -->
<title>Erlend Van Landeghem</title>

<!-- er wordt een link gelegd naar de css, via php-code, voor concrete5 -->
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStylesheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStylesheet('typography.css')?>" />

<!-- FONTS LADEN -->
<link href='http://fonts.googleapis.com/css?family=Special+Elite' rel='stylesheet' type='text/css'>
<script src="//use.typekit.net/dso8hgg.js"></script>
<script>try{Typekit.load();}catch(e){}</script>


<!-- zorg ervoor dat de editing toolbar beschikbaar is in concrete5 -->
<?php Loader::element('header_required'); ?>

</head>

<body>
<div id="wrapper">

<div id="navwrapper">
  <label for="show-menu" class="show-menu">Show Menu</label>
    <input type="checkbox" id="show-menu" role="button">
    <div id="menu">
    <?php
            $a = new Area('Header Nav');
            $a->display($c);
            ?>
    </div>
  </div>
  <div id="container">
  <div id="header">Erlend Van Landegem <div id="kunstenaar">KUNSTENAAR</div></div>

Css代码:

@charset "UTF-8";
/* CSS Document */

/** * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) * http://cssreset.com */html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
    display: block;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
/* tot zover de css reset! */

@font-face { /* declare fonts */
    font-family: "MuseoLight";
    src: url("fonts/Museo300-Regular.eot");
    src: local("Museo 300"), local("Museo-300"),  url("fonts/Museo300-Regular.woff") format("woff"),  url("fonts/Museo300-Regular.otf") format("opentype"),  url("fonts/Museo300-Regular.svg#Museo-300") format("svg");
}
#menu {
    font-family: 'Special Elite';
    margin-top: 200px;
    font-size: 14px;
}
#navwrapper {
    width: 240px;
    left: -1px;
    background-color: #333333;
    height: 100%;
    position: fixed;
    float: left;
    text-align: left;
    box-shadow: 1px 0px 3px #888888;
}
#menu li {
    border-style: solid;
    border-bottom: 1px solid #484848;
}
#menu li a {
    color: #FFFFFF;
    text-decoration: none;
    display: block;
    padding-top: 15px;
    padding-bottom: 15px;
    padding-left: 80px;
}
#menu li a:hover {
    background-color: #484848;
}
.show-menu {
    font-family: 'Special Elite';
    text-decoration: none;
    color: #fff;
    background: #333333;
    text-align: center;
    padding-top: 15px;
    display: none;
    font-size: 20px;
    background-color: #333333;
    height: 40px;
    border-style: solid;
    border-bottom: 1px solid #484848;
    margin-left: auto;
    margin-right: auto;
    width: 480px;
}
/*Hide checkbox*/
input[type=checkbox] {
    display: none;
}
/*Show menu when invisible checkbox is checked*/
input[type=checkbox]:checked ~ #menu {
    display: block;
}
#container {
    margin-left: 240px;
}
#header {
    font-family: 'Special Elite';
    padding-top: 40px;
    padding-bottom: 15px;
    font-size: 40px;
    background-color: #efeff0;
    color: #333333;
    padding-left: 35px;
}
#cwrap {
    padding-top: 35px;
    padding-left: 35px;
    width: 100%;
    max-width: 800px;
    display: inline-block;
}
h1 {
    font-family: 'Special Elite';
    text-transform: uppercase;
    font-weight: 500;
    padding-bottom: 30px;
}
h2 {
    font-family: 'Special Elite';
    font-size: 16px;
    font-weight: 400;
    color: #9e9d9d;
    padding-bottom: 30px;
}
h2:after {
    content: ' ';
    display: block;
    border: 1px dotted #d0d0d0;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}
#kunstenaar {
    font-family: 'Museo';
    font-weight: 300;
    font-size: 23px;
}
p {
    font-family: 'Museo';
    font-weight: 300;
    font-size: 0.9em;
    padding-bottom: 10px;
    display: inline-block;
    text-align: left;
}
#nieuws {
    width: 100%;
    display: inline-block;
}
body {
    font-size: 100%; /* flexible baseline */
}

/* css voor de left_sidebar template*/
#left-sidebar{
    float: left;
    width:250px;
    margin-right:30px;
}
#main {
    float:left;
    width:600px;
}
.clear{
    clear: both;
}

/* css voor de right_sidebar template*/
#right-sidebar{
    float: right;
    width:250px;
    margin-left:30px;
}

/* css die alles responsive maakt */

@media only screen and (max-width : 480px) {
#navwrapper {
    width: 100%;
    left: -1px;
    text-align: center;
    background-color:transparent;
    max-width: 480px;
}
#menu {
    font-family: 'Special Elite';
    font-size: 18px;
    margin-top: 0px;
}
#menu li a {
    color: #FFFFFF;
    text-decoration: none;
    display: block;
    padding-top: 15px;
    padding-bottom: 15px;
    padding-left: 0px;
    background-color: #333333;
}
#menu li {
    border-style: solid;
    border-bottom: 1px solid #484848;
}
ul {
    position: static;
    display: none;
}
/*Create vertical spacing*/

    /*Make all menu links full width*/
ul li, li a {
    width: 100%;
}
/*Display 'show menu' link*/
.show-menu {
    display: inline-block;
    width: 100%;
}
#container {
    margin-left: 0px;
    display: inline-block;
    width: 100%;
    max-width: 480px;
}
#cwrap {
    padding-top: 0px;
    padding-left: 0px;
    width: 100%;
    max-width: 480px;
    display: inline-block;
}
#header {
    display: block;
    width: 100%;
    padding-left: 0px;
}
}

截图: 普通布局:这里enter link description here 较小的浏览器窗口,菜单无法点击:here

0 个答案:

没有答案