4 replies [Last post]
rodlloyd
rodlloyd's picture
Offline
newbie
Last seen: 3 years 10 weeks ago
Timezone: GMT-8
Joined: 2016-02-08
Posts: 6
Points: 8

I have been attempting to make a site responsive. I used Brackets to create my code and all went well. When I put it on my site, I got the following error at the top of the page, then it loaded as I wanted. I suspect my code is fighting existing code but have no clue how to fix. Error only shows up on smart phone

window.onload = function() { if(!window.location.hash) { window.location = window.location + '#loaded'; window.location.reload(); } }

site address http://www.oregongardenclubs.org/

Comments welcome on my coding

Events

Forms

Forms

Forms

Forms

skin.css

/* designed for 1Phone 6 plus and smaller at 414 wide */
.container9 {
width:100%;
height:414px;
border:3px solid gray;
}
.events {
display: block;
float: left;
background-color: blue;
width:50%;
height:33.332%;
}
.forms {
float: left;
background-color: pink;
width:50%;
height:33.332%;
}
.officers {
float: left;
background-color: red;
width:50%;
height:33.332%;
}
.districts {
float: left;
background-color: green;
width:50%;
height:33.332%;
}
.newsletter {
float: left;
background-color: pink;
width:50%;
height:33.332%;
}
.photo {
float: left;
background-color: brown;
width:50%;
height:33.332%;
}
img {
max-width: 100%;
height: auto;
}

rodlloyd
rodlloyd's picture
Offline
newbie
Last seen: 3 years 10 weeks ago
Timezone: GMT-8
Joined: 2016-02-08
Posts: 6
Points: 8

retry at submitting the html

<head>
  <meta name=”viewport” content=width=device-width, initial-scale=1.0>
  <link rel="stylesheet" type="text/css" href="skin.css">
</head>
<body>
  <div class="container">
    <div class="events"><img src="EventsCal.jpg" alt="Events" style="width:207px; height:140px;"></div>
    <div class="forms"><img src="forms.jpg" alt="Forms" style="width:207px; height:140px;"></div>
    <div class="officers"><img src="officer.jpg" alt="Forms" style="width:207px; height:140px;"></div>
    <div class="districts"><img src="Districts.jpg" alt="Forms" style="width:207px; height:140px;"></div>
    <div class="newsletter"><img src="Newsletter.jpg" alt="Forms" style="width:207px; height:140px;"></div>
    <div class="photo"><img src="photo.jpg" alt="Forms" style="width:207px; height:140px;"></div>
  </div>
</body>
</html>

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 18 hours 2 min ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

HI rodlloyd, I don't see the

HI rodlloyd,
I don't see the error on my phone.
Could it have been a cache issue?

rodlloyd
rodlloyd's picture
Offline
newbie
Last seen: 3 years 10 weeks ago
Timezone: GMT-8
Joined: 2016-02-08
Posts: 6
Points: 8

Thanks for looking It is dark

Thanks for looking

It is dark text on a black background above the header so it is not easy to see but it is taking up valuable screen space

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 18 hours 2 min ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

If you have a look at the

If you have a look at the source of the page you will see the code is outside the script tags.
It starts at a closing script tag.

</script>window.onload = function() {
    if(!window.location.hash) {
        window.location = window.location + '#loaded';
        window.location.reload();
    }
}<script type="text/javascript" 
then ends as another script tag starts.