Skip to main content

Is Any Of My CSS Or Javascript Crashing The Mobile Version of Google Chrome?

I'm a beginner in coding with HTML, CSS, and Javascript, and have created a simple website with a responsive menu. It works well on every browser except for the mobile (ios) version of Google Chrome. What's happening is that after viewing a few pages if I try to click on a link and navigate to another page it will constantly show that it's loading that page and nothing happens, it stays on the current page. After that, it's as if the site freezes and I have trouble navigating to any previous page I've viewed.

I've seen that some people are having difficulty with the mobile version of Google Chrome based upon certain code (CSS and/or Javascript) and wondered if that is what may be causing my website not to open properly on it. If anyone has any knowledge as to what may be causing my website not to load properly I'd appreciate you sharing your knowledge with me. Thank you.

HTML/MENU:

<!DOCTYPE html>
<html lang="ja">
    
<head>
      
<meta name="viewport" content="width=device-width, initial-scale=1.0;" charset="utf-8">
    
<title>MORIKOBOSHI・</title>
    
</head>
    
<body>
      
<div class="page-wrap">
     
<div class="cp_cont">
<input id="cp_toggle03" type="checkbox">
<div class="cp_mobilebar">
<label for="cp_toggle03" class="cp_menuicon">
<span></span>
</label>
</div>
<label id="h-menu_black" class="cp_toggle03" for="cp_menuicon"></label>
<div id="body" class="noscroll"></div>

<header class="cp_offcm03">
        
<nav>
<ul style="text-align: center; margin-left: 210px; overflow: hidden; padding-bottom: 10px; font-size: 15px;">
            
<li style="border-bottom: 1px solid lightgray;"><a href="#">ホーム</a></li>
<li style="border-bottom: 1px solid lightgray;"><a href="#">ブログ</a></li>
<li style="border-bottom: 1px solid lightgray;"><a href="#">このサイトについて</a></li>
<li style="border-bottom: 1px solid lightgray;"><a href="#">参考文献</a></li>

Javascript:

<div class="searchbar"> 
            
<form id="frmSearch" class="search2" method="get" action="default.html" style=" padding-right: 10px; padding-top: 20px; text-align: center; position: inline;">
<input class="search2" id="txtSearch" type="text" placeholder="Googleカスタム検索" name="serach_bar" size="31" maxlength="255" value="" style="top: 185px; width: 180px; height: 26px;">
<input class="search1" type="submit" name="submition" value="検索" style="padding-left: 5px; top: 153px; height: 25px; width: 36px; display: inline-flex; justify-content: center; font-size: 10.5px;">
<input class="search2" type="hidden" name="sitesearch" value="default.html">
    </form>
    </div>


<script type = "text/javascript"> document.getElementById('frmSearch').onsubmit = function() {
    window.location = 'http://www.google.com/search?q=site:morikoboshi.com' + document.getElementById('txtSearch').value;
    return false;
} </script> 

<script>
document.getElementById('cp_toggle03').onchange = function() {
 if (document.getElementById('cp_toggle03').checked) {
 document.body.style.overflow = "hidden";
  } else {
 document.body.style.overflow = "";
  }
}
 
var elements = document.getElementsByTagName('li');
var closeHamp = function() {
 document.getElementsByClassName('cp_menuicon')[0].click();
    };

 for (var i = 0; i < elements.length; i++) {
  elements[i].addEventListener('click', closeHamp, false);
    }
</script>

CSS:

.body {background-color: white;
       font-family: sans-serif;
        }

.searchbar {float: right;
        }

.image {text-align: center;
        }

.setsumei {margin-left: 20px;
            margin-right: 20px;
        }

.footer {width: 100%;
         height: 40px;
         text-align: center;
         border-top: 1px solid black;
         position: absolute;
         bottom: 0;
         padding: 10px;
        }

.page-wrap {min-height: 100%;
            margin-bottom: -40px;
        }

.page-wrap:after {content: "";
                  display: block;
        }

.site-footer,
.page-wrap:after {height: 20px;
        }

.site-footer {text-align: center;
              border-top: 1px solid black;
              padding: 10px;
        }


*,
*:before,
*:after {padding-left: 0;
         margin: 0;
         box-sizing: border-box;
        }

ol,
ul {list-style: none;
        }

a {text-decoration: none;
   color: black;
        }

.cp_cont {height: auto;
        }

/* menu */
.cp_offcm03 {position: relative;
             z-index: 5000;
             top: 0;
             left: 0;
             right: 0;
             bottom: 0;
             overflow: auto;
             width: 100%;
             height: auto;
             padding-top: 0;
             -webkit-transition: transform 0.3s ease-in;
             transition: transform 0.3s ease-in;
             text-align: center;
             color: black;
             background-color: white;
        }

.cp_offcm03 nav,
.cp_offcm03 ul {height: 100%;
        }

.cp_offcm03 li {display: inline-block;
                margin-right: -6px;
        }

.cp_offcm03 a {display: block;
               padding: 15px 45px;
               margin-bottom: -5px;
              -webkit-transition: background-color .3s ease-in;
              transition: background-color .3s ease-in;
        }

.cp_offcm03 a:hover {background-color: lightgray;
        }

/* menu toggle */
#cp_toggle03 {display: none;
        }

#cp_toggle03:checked~.cp_offcm03 {-webkit-transform: translateX(0);
                                  transform: translateX(0);
        }

#cp_toggle03:checked~.cp_container {-webkit-transform: translateX(0);
                                    transform: translateX(0);
        }

.cp_mobilebar {display: none;

        }

/* content */
.cp_container {position: relative;
               top: 0;
               padding: 35px auto;
               -webkit-transition: transform .3s ease-in;
               transition: transform .3s ease-in;
        }

.cp_content {margin: 0 auto;
             padding: 20px;
             height: 65vh;
             text-align: center;

        }

@media (max-width: 1130px)and (min-width: 280px) {

/* menu */
.cp_offcm03 {position: fixed;
             left: -250px;
             overflow-y: hidden;
             width: 250px;
             height: 100%;
             padding-top: 40px;
             color: black;
             background-color: white;
             z-index: 1000;
            }

.cp_offcm03 nav {background: white;
                 border-right: 0.5px solid lightgray;
                 margin-left: -210px;
            }

.cp_offcm03 li {display: block;
                margin-right: 0;
            }

.cp_offcm03 a {padding: 20px;

            }

/* menu toggle */
.cp_mobilebar {display: block;
               z-index: 2000;
               position: relative;
               top: 0;
               left: 0;
               padding: 0 25px;
               width: 100%;
               height: 40px;
               background-color: white;
               border-bottom: .05px solid lightgray;
               }

.cp_menuicon {display: block;
              position: relative;
              width: 25px;
              height: 100%;
              cursor: pointer;
              -webkit-transition: transform .3s ease-in;
              transition: transform .3s ease-in;
            }

.cp_menuicon>span {display: block;
                   position: absolute;
                   top: 55%;
                   margin-top: -0.3em;
                   width: 100%;
                   height: 0.2em;
                   border-radius: 1px;
                   background-color: black;
                   -webkit-transition: transform .3s ease;
                   transition: transform .3s ease;
            }

.cp_menuicon>span:before,
.cp_menuicon>span:after {content: "";
                         position: absolute;
                         width: 100%;
                         height: 100%;
                         border-radius: 1px;
                         background-color: black;
                         -webkit-transition: transform .3s ease-in;
                         transition: transform .3s ease-in;
            }

.cp_menuicon>span:before {-webkit-transform: translateY(-0.6em);
                          transform: translateY(-0.6em);
            }

.cp_menuicon>span:after {-webkit-transform: translateY(0.6em);
                         transform: translateY(0.6em);
            }

#cp_toggle03:checked+.cp_mobilebar .cp_menuicon {-webkit-transform: rotate(45deg);
                                                 transform: rotate(45deg);
            }

#cp_toggle03:checked+.cp_mobilebar span:before,
#cp_toggle03:checked+.cp_mobilebar span:after {-webkit-transform: rotate(90deg);
                                               transform: rotate(90deg);
            }

#cp_toggle03:checked~.cp_offcm03 {-webkit-transform: translateX(100%);
                                  transform: translateX(100%);
            }

#cp_toggle03:checked~.cp_container {-webkit-transform: translateX(250px);
                                    transform: translateX(250px);
            }

input:checked~#h-menu_black {display: block;
                             opacity: .6;
            }

#h-menu_black {display: none;
               position: fixed;
               z-index: 999;
               top: 0;
               left: 0;
               width: 100%;
               height: 100%;
               background: black;
               opacity: 0;
               transition: .7s ease-in-out;
            }

/* content */
.cp_container {top: 60px;
               height: 92vh;
               text-align: center;
            }

.noscroll {overflow: hidden;
           position: fixed;
            }
        }
Via Active questions tagged javascript - Stack Overflow https://ift.tt/ICsoGYX

Comments

Popular posts from this blog

How to show number of registered users in Laravel based on usertype?

i'm trying to display data from the database in the admin dashboard i used this: <?php use Illuminate\Support\Facades\DB; $users = DB::table('users')->count(); echo $users; ?> and i have successfully get the correct data from the database but what if i want to display a specific data for example in this user table there is "usertype" that specify if the user is normal user or admin i want to user the same code above but to display a specific usertype i tried this: <?php use Illuminate\Support\Facades\DB; $users = DB::table('users')->count()->WHERE usertype =admin; echo $users; ?> but it didn't work, what am i doing wrong? source https://stackoverflow.com/questions/68199726/how-to-show-number-of-registered-users-in-laravel-based-on-usertype

Why is my reports service not connecting?

I am trying to pull some data from a Postgres database using Node.js and node-postures but I can't figure out why my service isn't connecting. my routes/index.js file: const express = require('express'); const router = express.Router(); const ordersCountController = require('../controllers/ordersCountController'); const ordersController = require('../controllers/ordersController'); const weeklyReportsController = require('../controllers/weeklyReportsController'); router.get('/orders_count', ordersCountController); router.get('/orders', ordersController); router.get('/weekly_reports', weeklyReportsController); module.exports = router; My controllers/weeklyReportsController.js file: const weeklyReportsService = require('../services/weeklyReportsService'); const weeklyReportsController = async (req, res) => { try { const data = await weeklyReportsService; res.json({data}) console...

How to split a rinex file if I need 24 hours data

Trying to divide rinex file using the command gfzrnx but getting this error. While doing that getting this error msg 'gfzrnx' is not recognized as an internal or external command Trying to split rinex file using the command gfzrnx. also install'gfzrnx'. my doubt is I need to run this program in 'gfzrnx' or in 'cmdprompt'. I am expecting a rinex file with 24 hrs or 1 day data.I Have 48 hrs data in RINEX format. Please help me to solve this issue. source https://stackoverflow.com/questions/75385367/how-to-split-a-rinex-file-if-i-need-24-hours-data