Author Topic: I am losing my mind, this has never happen to me.  (Read 254 times)

Strider64

  • Professional PHP Helper
  • Senior Member
  • *
  • Posts: 886
  • Karma: 65
  • Don't Use mysql....use mysqli or PDO!
    • View Profile
    • Pepster's Place

I'm creating this website
https://www.triviaintoxication.com/ and I am having a bugger of a time with my html/css footer.

Here's my HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  <?php
  
require_once 'lib/includes/utilities.inc.php';
  
  use 
website_project\trivia_game\GenerateGame as Generate;
  
  
$dailyTen = [];
  
$categories = ['movie''space'];
  
$generate = new Generate();
  
 
$result $generate->checkTriviaTable();
 
 if (
$result) {
     
$data $generate->readTriviaQuestions($categories);
 
     if (
$data) {
         
$dailyTen $generate->dailyQuestions($data);
         
$generate->updateTriviaQuestions($dailyTen);
     }
 }
 
?>
 
<!DOCTYPE html>
 <!--
 Trivia Game Version 1.0;
 by John Pepp
 January 31, 2017
 -->
 <html lang="en">
     <head>
         <meta charset="UTF-8">
         <meta name="viewport" content="initial-scale=1.0, width=device-width" />
         <title>Trivia IntoXication</title>
         <link rel="stylesheet" href="lib/css/stylesheet.css">
     </head>
     <body>
         <div id="container">
             <div id="heading">
                 <h1>Trivia<span id="toxic">IntoXication</span></h1>
                 <h2 id="subheading">Don't Drive Drunk, Play this Game Instead!</h2>
             </div>
 
             <div id="mainGame">
                 <div id="screen">
                     <!-- The Question that is pulled in from PHP and JavaScript -->
                     <h2 id="question">Question</h2>
                 </div>
                 <!-- The Possible Answers that is also pulled in from PHP and pure JavaScript -->
                 <button id="answer1" class="answers enable" data-answer="1">&nbsp;</button>
                 <button id="answer2" class="answers enable" data-answer="2">&nbsp;</button>
                 <button id="answer3" class="answers enable" data-answer="3">&nbsp;</button>
                 <button id="answer4" class="answers enable" data-answer="4">&nbsp;</button>
 
                 <div id="scoring">
                     <h2><span id="correct">&#38;#10004;  0</span><span id="wrongText">&#38;#10004; 0</span></h2>
                 </div>
 
                 <div id="display">
                     <h2 id="clock">&nbsp;</h2>
                     <button id="next">Next</button>
                 </div>
 
 
             </div>
 
             <div id="info">
                 <p>I have decided to chunk jQuery to the trash bin and convert this game over to pure JavaScript (some call it vanilla JavaScript), so when I eventually deem this HTML/CSS game worthy enough for a tutorial it will be more portable. It should be also easier for people to write javascript, for in my opinion learning javascript makes it easier to understand and there really is not that much more code added.</p>
             </div>
             
             <div id="myFooter">
                 <p class="footer-text">John R. Pepp</p>
             </div>
             
         </div>
         <script src="lib/js/trivia.js"></script>
     </body>
 </html>



and here's my css (it's a Sass file scss):
Code: [Select]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
   @import url("https://fonts.googleapis.com/css?family=Merriweather|Raleway");
   /*  Color Theme*/
   /*
       Created on : Feb 16, 2016, 8:22:58 AM
       Author     : strider64
   */
   /* http://meyerweb.com/eric/tools/css/reset/
      v2.0 | 20110126
      License: none (public domain)
  */
  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, textarea, 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; }
  
  body {
    line-height: 1; }
  
  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; }
  
  /*******************************************
  GENERAL CSS STYLING
  ********************************************/
  * {
    padding: 0;
    margin: 0;
    box-sizing: border-box; }
  
  .enable {
    background-color: #F19F4D; }
    .enable:hover {
      background-color: #c86c10; }
  
  .disable {
    background-color: #999999; }
  
  .correct {
    background-color: green; }
  
  .wrong {
    background-color: red; }
  
  .wrongText {
    color: red; }
  
  body {
    background-color: #F2F2F2; }
  
  /*******************************************
  TYPOGRAPHY CSS STYLING
  ********************************************/
  h1, h2, h3, th {
    font-family: 'Merriweather', serif; }
  
  p, td {
    font-family: 'Raleway', sans-serif; }
  
  /* SMARTPHONE STYLING */
  @media only screen and (max-width: 480px) {
    /*******************************************
    HEADING CSS STYLING
    ********************************************/
    div#heading {
      display: block;
      width: 100%;
      max-width: 100%;
     height: 100%;
     min-height: 50px;
     background-color: #2E2E2E;
     text-align: center;
     padding: 5px; }
     div#heading h1 {
       font-size: 1.2rem;
       color: #fff; }
       div#heading h1 span#toxic {
         font-size: 1.8rem;
         color: #F19F4D; }
     div#heading h2#subheading {
       display: block;
       font-family: Arial, Helvetica, sans-serif;
       font-size: 1.0rem;
       line-height: 1.5;
       color: lightgreen;
       font-style: italic; }
 
   /*******************************************
   GAME CSS STYLING
   ********************************************/
   div#mainGame {
     display: block;
     width: 100%;
     height: auto;
     background-color: #2E2E2E;
     padding: 10px; }
     div#mainGame div#screen {
       display: inline-block;
       width: 100%;
       max-width: 100%;
       height: 200px;
       background-color: #909090;
       padding: 10px; }
       div#mainGame div#screen h2#question {
         font-size: 1.02rem;
         line-height: 1.5;
         color: #fff; }
     div#mainGame button.answers {
       display: block;
       width: 100%;
       height: 50px;
       border: none;
       outline: none;
       cursor: pointer;
       font-size: 1.0rem;
       line-height: 50px;
       color: #fff;
       text-align: left;
       padding: 0 10px;
       margin: 5px 0; }
     div#mainGame div#scoring {
       display: block;
       width: 100%;
       height: 50px;
       background-color: #fff;
       text-align: center; }
       div#mainGame div#scoring h2 span#correct {
         float: left;
         font-size: 1.4rem;
         line-height: 50px;
         color: green;
         padding-left: 40px; }
       div#mainGame div#scoring h2 span#wrongText {
         float: right;
         font-size: 1.4rem;
         line-height: 50px;
         color: red;
         padding-right: 40px; }
     div#mainGame div#display {
       display: block;
       width: 100%;
       height: 50px;
       background-color: #F19F4D;
       text-align: center; }
       div#mainGame div#display h2#clock {
         float: left;
         font-family: Arial, Helvetica, sans-serif;
         font-size: 1.4rem;
         line-height: 50px;
         color: green;
         text-transform: capitalize;
         padding-left: 40px; }
       div#mainGame div#display button#next {
         float: right;
         display: block;
         width: 100px;
         height: 30px;
         border: none;
         outline: none;
         cursor: pointer;
         background-color: #fff;
         font-size: 1.2rem;
         color: green;
         margin-top: 10px;
         margin-right: 40px; }
         div#mainGame div#display button#next:hover {
           color: #2E2E2E; }
 
   div#info {
     border: 10px solid #2e2e2e;
     background-color: #F19F4D;
     padding: 10px; }
     div#info p {
       font-size: 1.0rem;
       line-height: 1.5;
       font-weight: bold; }
 
   div#footer {
     border: 5px solid #fff;
     width: 100%;
     height: 50px;
     background-color: #2e2e2e;
     text-align: center; }
     div#footer p.footer-text {
       font-size: 1.2rem;
       line-height: 40px;
       color: #fff; } }
 
 
 @media only screen and (min-width: 978px) {
   div#container {
     display: block;
     width: 100%;
     max-width: 978px;
     height: auto;
     margin: 0 auto; }
 
   /*******************************************
   HEADING CSS STYLING
   ********************************************/
   div#heading {
     display: block;
     width: 100%;
     max-width: 75.000rem;
     height: 100%;
     min-height: 9.375rem;
     background-color: #2E2E2E;
     text-align: center;
     padding: 1.250rem;
     margin-bottom: 1.250rem; }
     div#heading h1 {
       font-size: 3.2rem;
       color: #fff; }
       div#heading h1 span#toxic {
         font-size: 4.4rem;
         color: #F19F4D; }
     div#heading h2#subheading {
       display: block;
       font-family: Arial, Helvetica, sans-serif;
       font-size: 1.4rem;
       line-height: 1.5;
       color: lightgreen;
       font-style: italic; }
 
   div#mainGame {
     float: left;
     display: block;
     width: 100%;
     max-width: 489px;
     height: auto;
     background-color: #2e2e2e; }
     div#mainGame div#screen {
       display: inline-block;
       width: 100%;
       max-width: 489px;
       height: 12.500rem;
       background-color: #909090;
       padding: 10px; }
       div#mainGame div#screen h2#question {
         font-size: 1.2rem;
         line-height: 1.5;
         color: #fff; }
     div#mainGame button.answers {
       display: block;
       width: 100%;
       max-width: 489px;
       height: 50px;
       border: none;
       border-bottom: 2px solid #2e2e2e;
       outline: none;
       cursor: pointer;
       font-size: 1.0rem;
       line-height: 50px;
       color: #fff;
       text-align: left;
       padding: 0 10px;
       margin: 0; }
     div#mainGame div#scoring {
       display: block;
       width: 100%;
       max-width: 489px;
       height: 50px;
       background-color: #fff;
       text-align: center; }
       div#mainGame div#scoring h2 span#correct {
         float: left;
         font-size: 1.4rem;
         line-height: 50px;
         color: green;
         padding-left: 40px; }
       div#mainGame div#scoring h2 span#wrongText {
         float: right;
         font-size: 1.4rem;
         line-height: 50px;
         color: red;
         padding-right: 40px; }
     div#mainGame div#display {
       display: block;
       width: 100%;
       height: 50px;
       background-color: #F19F4D;
       text-align: center; }
       div#mainGame div#display h2#clock {
         float: left;
         font-family: Arial, Helvetica, sans-serif;
         font-size: 1.4rem;
         line-height: 50px;
         color: green;
         text-transform: capitalize;
         padding-left: 40px; }
       div#mainGame div#display button#next {
         float: right;
         display: block;
         width: 100px;
         height: 30px;
         border: none;
         outline: none;
         cursor: pointer;
         background-color: #fff;
         font-size: 1.2rem;
         color: green;
         margin-top: 10px;
         margin-right: 40px; }
         div#mainGame div#display button#next:hover {
           color: #2E2E2E; }
 
   div#info {
     float: left;
     display: block;
     width: 100%;
     max-width: 489px;
     height: 500px;
     background-color: lightgray;
     padding: 20px; }
     div#info p {
       font-size: 1.2rem;
       line-height: 1.5;
       font-weight: bold; }
 
   div#myFooter {
     height: 50px;
     background-color: #000;
     text-align: center; }
 
   p.footer-text {
     font-size: 1.2rem;
     line-height: 40px;
     color: #fff; } }
 
 /*# sourceMappingURL=stylesheet.css.map */
 

I flushed my browser's cache  and stopped my sass preprocessor  to use regular css to no avail. I inspected it with chrome's developer's tools and used https://validator.w3.org/ and https://jigsaw.w3.org/css-validator/ to check validation of my HTML and CSS .... it passed. Maybe someone can check it with their browser? The funny thing is if I yank out height: 50px it works. Any help would be helpful and Thanks in advance from someone who is pulling out his hair.
John
Insanity: doing the same thing over and over again and expecting different results -> https://www.pepster.com

PHP Help Forum

I am losing my mind, this has never happen to me.
« on: February 07, 2017, 01:15:50 am »


Strider64

  • Professional PHP Helper
  • Senior Member
  • *
  • Posts: 886
  • Karma: 65
  • Don't Use mysql....use mysqli or PDO!
    • View Profile
    • Pepster's Place
What a good night sleep can do and all over a simple clear: both; in CSS;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
      #myFooter {
          clear: both;
          display: block;
          width: 978px;
          height: 50px;
          background-color: #000;
          text-align: center;
          margin-top: 10px;
          p {
             font-size: 1.2rem;
             line-height: 40px;
             color: #fff;
         }
     }
Insanity: doing the same thing over and over again and expecting different results -> https://www.pepster.com

PHP Help Forum

Re: I am losing my mind, this has never happen to me.
« Reply #1 on: February 07, 2017, 06:32:10 am »