HTML & CSS problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

HTML & CSS problem

Why i cant see the text inside the bottom buttom? https://code.sololearn.com/WA215A17A10A/?ref=app .main__btn a { position: relative; z-index: 2; color: #fff ; text-decoration: none; } i make the text white here but i do not see the text in output? also the linear-gradient do not work for the NEXT GENERATION words, color does not change to white even if i put color: #fff; to See what makes us different text. :(

22nd Jan 2021, 9:11 PM
kaspars kaspars
kaspars kaspars - avatar
2 Answers
+ 4
Fix : https://code.sololearn.com/WmEAFa2aXhr3/?ref=app Explanation : The color of button anchor is because you have not closed your preceding h1 and h2 properly, the closing tag should be </h1> and </h2> The linear gradient is effecting, it's just not obvious, try to change the color to blue and yellow, and you can notice it. Lastly, for the JavaScript error, cannot addEventListener property of null Solve it by wrapping your JS code in window.onload = function(){ //.... your JS code } so that it runs after the elements are created.
23rd Jan 2021, 1:01 AM
Gordon
Gordon - avatar
0
thanks man, this fixed things. maybe you can help me with why this homepage is not mobile responsive? i am making it by the tutorial in youtube, in tutorial when he resize the screen to bigger it shows menu bar horizontaly just like this one but when he make the page smaller the menu bar transforms to 3x --- stripes under each other like menu bar which when pressed drags menu under each other. I have been stuck with this for hours, realy stuck. i mean in this video you can pause at 29.49 and youwill see the dropdown menu. i have the same code what he does but for me the menu items dissapear when i resize screen to smaller and i cant see that --- x3 https://www.youtube.com/watch?v=FazgJVnrVuI 29.49min
23rd Jan 2021, 8:02 AM
kaspars kaspars
kaspars kaspars - avatar