thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

part 17: My debug test window won't hide #221

Closed Chriswilldo closed 7 years ago

Chriswilldo commented 7 years ago

Even though all the coding is presumptively right, i can't hide that damn window or get my footer to color gray. Please reply for more details

creptor commented 7 years ago

That would be based on the identifiers given to those elements in the html, check that they're consistent with what you have in the CSS sheet.

To check that your JavaScript is working properly please place your code here.

If you're not sure about something please provide your code, I'll do my best to fix them. (please use a gist for this, just make it public and paste the link here)

Chriswilldo commented 7 years ago

https://gist.github.com/Chriswilldo/3d889adb4be726bc54184f8a1c86b6f1

Chriswilldo commented 7 years ago

I don't know why this worked but all I did was re copy and paste the sticky footer css and voila it stuck. Now for the debug button..

creptor commented 7 years ago

well I have found it :D was on phone later so didn't realized until now.... On line 20 of the "js.php" you should change the following:

</script

with:

</script>
creptor commented 7 years ago

ALSO IMPORTANT... You shouldn't mix PHP with JavaScript, changing that file to "js.js" makes the code less server intensive and faster. Also it keeps the file consistent, because if you use PHP there should be mostly server code (or code based logic) and no other (not essential) type of code in the file.

Chriswilldo commented 7 years ago

That didn't work. For line 20 that end script connects to the javascript cdn script . Still can't get it to work

Chriswilldo commented 7 years ago

I got it! So here's what I did / what happened. So with my footer, ultimately, I got it to properly color and stick by re copying the css from bootstrap, afterwards I looked up how to make it stick to the bottom by adding the codes bottom: 0; after position:absolute; and margin: 0 auto; after height. Then I went to w3schools and compared how they got their button to hide text. That helped me figure out to put my text in a h4 heading enclosed within a div tag. I'm not 100% sure why that works, but it does. Without the div tag, for some reason the text start to sink under the footer and without the header tag it hides the footer and the debug window. I went ahead and put the test debug on another page to test it better. I'm pretty you do that soon anyways though in your series. Hopefully the toggle part will work just as successfully.

Chriswilldo commented 7 years ago

https://gist.github.com/Chriswilldo/cb62322ba3c9a827c02f42c2bf34a775

In case you wanna see the edits.