It sounds like you want your video inside a popup/modal when the page loads and then you are either going to play it or close it.
If so what happens when you close it? Are you leaving the page blank or is there a page underneath that needs to be blacked out also and is revealed when the modal closes?
What does that have to do with any of my questions?
Of course transparent allows you to see whats behind because there would be nothing in the way. You don’t even have to say it.
Anyway as you didn’t answer my questions I put together this example from which you can extricate the bits you need as they are pieced from your examples.
I’m not sure what you mean as I don;t understand what you are trying to do now.
The working example is in my codepen.
You seem to have changed the js and css and I don;t know what you are trying to do? My js was all you need to close the modal as you that was what you were asking. You didn’t ask to open and close it.
If you want different blog-pager buttons then create a different class for one of the sets.
The modal is using position:fixed which means it does not scroll with the viewport. Therefore if the viewport height is smaller than the modal you will not be able to scroll down to see the X using any of the viewports scrollbars. The only way to scroll to see the X is to scroll inside the modal itself which means a separate scroll mechanism to the main viewport. That results in two scrollbars.
Note that is very bad UI to allow the content underneath a modal to scroll. The very nature of a modal should be that the modal is the only thing you interact with until you dismiss it.
What you ask is impossible for a fixed position element that is greater than the viewport height as you have to have 2 scrollbars do to it.
You could make the video responsive and have it get smaller so that it never goes out of the viewport but that would be quite awkward in that set up and would look odd.
Otherwise there is no other solution unless you don’t fix the modal but have it scroll away with the document but once again that is bad UI and plainly nonsense.
It only has one scrollbar? The other scrollbar is the fiddle itself and not part of your layout…
If you mean why is there a scrollbar then that’s because you have placed the exit button below the fold of the screen and thus the scrollbar appears so you can get to it.
You placed the exit button at bottom:-47px so you get 47px of scroll on the viewport.
Move the button up to bottom:0 and the scroll should go away but you would need to raise the z-index otherwise it goes behind the video. If you don;t want it on top of the video then you’d have t make the video smaller. You can’t have a video full screen and then put something below it without having to scroll to it.
I’m not sure what you are asking as once the modal is closed you are back to your original page and that has padding on most items and you can adjust whatever one you want. You have 50px padding top and bottom on the body so if you want 8px side margins then add it there. body{padding:50px 8px}
As they are all the same you could just use shorthand of padding:8px;
Exactly as you had it in the first place with the double scrollbar appearing when the popup is too tall for the viewport. Reduce the screen height on that demo and you end up with 2 scrollbars. Very ugly and very bad UI. Its also very bad UI to scroll the page underneath when a modal is in action as I already mentioned.
If that’s the badness you want then remove the overflow:hidden from the :has rule on the body element that I gave you.