+ 5

[Resolved] Flappy bird / margin

why my flappy bird have a margin-top ? (clic on the subMenu in the right-up corner when you scroll down) https://code.sololearn.com/WC4Ncb88P3rB/?ref=app

17th Sep 2017, 7:35 AM
NoxFly
NoxFly - avatar
6 Answers
+ 9
Because your outter-wrapper (#sub-Menu) css rules define it as positionned (fixed), but you doesn't provide 'top' nor 'left' values, so it's positionned at its original position (if it was not positionned -- ie: 'static' default value -- but without reserving place)... Just add: top:0; ... will be enough to fix it, but more safe to add also: left:0; Anyway, that's not the only display bug: depending on viewport size/orientation, your outter-wrapper will fit in whole width, but not inner-content (canvas zone) ;P (you should add an explicit full css width, as you do for height, and dynamically adapt width and height attributes to have correct canvas image ratio depending on viewport ratio ^^)
17th Sep 2017, 7:57 AM
visph
visph - avatar
+ 7
@Visph, I find, I just did -> When canvas is display block: page i display none -> and when page ys display block: canvas is display none. I've just change this : there was id="page" and in the js : $('#page') but I transform in the html in class="page" without transform the js in $('.page') but thanks ! :D
17th Sep 2017, 8:07 AM
NoxFly
NoxFly - avatar
+ 5
@Chrizzhigh: are you a parrot? @@
17th Sep 2017, 8:12 AM
visph
visph - avatar
+ 5
@Visph, if I mark an answer as best, it's bcs I think the pb is resloved by that the guy said. and I self-resolved my pb. but if I could mark 2 good answer I will do that. I'm sorry, and I mark your answer as the best. if you see, it's the first post I do that. I'm not as your description of me.
17th Sep 2017, 8:16 AM
NoxFly
NoxFly - avatar
+ 3
Adding "top: 0;" to your "#sub-menu" in css fixed the problem for me
17th Sep 2017, 8:09 AM
Chrizzhigh
Chrizzhigh - avatar
+ 1
I will no more help you: you mark my answer as best, an then retrieve it for set at yours... it's not respectfull at all, and doesn't provide you XPs, just make a bad image of you and pervert best answer mark purpose ^^ That's also because of lot of people like you that I want to take less to less time to participate to SL :P
17th Sep 2017, 8:11 AM
visph
visph - avatar