I am glad my video helped you learn some html and css! There is another one (netflix clone) coming today. Feel free to check it out and let me know what I can improve ☺️ Have a wonderful day! /Dawid
I have everything needed in my code however the vehicle titles only display on the first one when I scroll its blank. 42:00 section .content{ opacity:0; z-index:1; position: fixed; width: 100%; top: 0; transition: opacity .3s ease; height: 100vh; padding-top: 15vh; padding-bottom: 15vh; text-align: center; display: grid; grid-template-rows: min-content auto min-content; } section.active .content{ opacity:1; }
Hey great video! I had a question - seems like when i resize my window to mobile size, it begins to repeat the background image? It didn’t seem like it was an issue for you, but i endd up adding no-repeat to the section style in css which fixed that issue but then caused the images to not completely fill up the page. Any advice ?
Great work Sir! Helped me to use grids for first time and the way you were using perfect on-point functions it seemed so easy to clone Tesla 😂.... Well I need to work on JavaScript. Please suggest me some videos where I can sip it
Great video, question though. Is there a way to stop the scroll from breaking? Sometimes it won't go to the next section if you scroll to a certain point, and sometimes text won't even appear
im really having problem with the background images .how do you make background images .is javasript needed if you are using css and html.cause when i do background image and i style it in the css i can only use one image . the remaining wont show i hope you get what im saying.
Hi David, thanks for the tutorial. However, my middle pages are not becoming active and therefore I guess they are not showing the content h1. What to do? (For scroll.js, I copied the code from comments here)
@@CodingWithDawid Downloaded your entire folder. Still the same problems: scrolling is not working as it should. In inspect I see the class active only at the first page and if i go down till the end, on the last page. Middle pages are not receiving active class name
@@CodingWithDawid , It seems I can not see your repozitoriy as a normal website, can you turn this option on? Then I would check it on my mobile, maybe it is my Visual-Studio-run-server is creating a problem...
hi; thanks for the video. sadly the js code for scrollingdoes not work for me. I have a Site in Divi Theme with 6 Sections, if I implement the code my sections disappear, cause all of them get the class active. Do you have a solution for this or somebody had the same issue? Thanks a lot.
Uncaught SyntaxError: missing ) after argument list. any solution? i did exatly like you did. error in this line document.querySelector(selectors:'.backdrop').className = 'backdrop active';
Hi Dawid I liked your video. I have doubt at timeline of 40min the scroll is not working smooth for me , it going too slow as it worked for you earlier. attaching code that i followed. could suggest me where it's wrong . document.lastScrollPosition = 0; document.lastCentered = 0; document.onWayTo = null; document.addEventListener('scroll', () => { const direction = window.pageYOffset -document.lastScrollPosition > 0 ? 'down' : 'up'; const sections = [...document.querySelectorAll('section')]; const destIndex = direction === 'up' ? document.lastCentered - 1 : document.lastCentered + 1 if (destIndex >= 0 && destIndex < sections.length) { console.log({ destIndex, direction }); document.onWayTo = destIndex; window.scroll(0,sections[destIndex].offsetTop); } sections.forEach((section,index) => { if(window.pageYOffset === section.offsetTop){ document.lastCentered = index; if(document.onWayTo === index){ document.onWayTo = null; } } }) document.lastScrollPosition = window.pageYOffset; })
THis is what I have for line 10 in nav.js document.getElementById('menuBtn').onclick = e => { e.preventDefault(); openMenu(); It is telling me on inspect when I try to select menu this: Uncaught TypeError: Cannot set properties of null (setting 'onclick') at nav.js:10:44 I am so close lol
I am new to coding say doing it for one month I think. I am getting errors on my last line is this correct formatting? document.getElementById(elementID:'menuBtn').onclick = 0 => { e.preventDefault(); openMenu(); }