/    Sign up×
Community /Pin to ProfileBookmark

Video controls not hidden under fixed element

can you suggest a way to hide controls when the video
is scrolled under the fixed element

“`
<!DOCTYPE html><html lang=”en”><head><meta charset=”utf-8″>
<meta name=”viewport” content=”initial-scale=1″>
<title>Vapour Ware</title>
<style>
body {
background: #eef;
}
#headsection {
position: fixed;
width: 100%;
top: 0;
margin: 0;
height: 6.2em;
background: #eef;
}
main section{
padding-top: 6.3em;
}
#videosection video {
width: 400px;
height: 300px;
}
#empty {
height: 600px;
}
</style>
</head>
<body>
<section id=”headsection”>
<header id=”header”>
</header>
</section>
<main>
<section id=”videosection”>
<video id=”video” width=”400″ height=”300″ controls src=”https://archive.org/download/Popeye_forPresident/Popeye_forPresident_512kb.mp4″>
</video>
</section>
<section id=”empty”>
</section>
</main>
</body>
</html>
“`

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@cootheadSep 22.2020 — Hi there DaveyErwin,

add...
<i>
</i>z-index: 1;

...to your [b]#headsection[/b] code.

[i]coothead[/i]
Copy linkTweet thisAlerts:
@daveyerwinauthorSep 22.2020 — @coothead#1623539 said ...

add...

z-index: 1;

...to your #headsection code.

- - - - - - - -
Thank You, yes you solved my problem!

I am left to wonder why the video was hidden as I expected

but , the controls were not until I acted on your suggestion ?

I will guess that the controls are uh maybe pseudo elements ?

Thanks again
Copy linkTweet thisAlerts:
@cootheadSep 22.2020 — No problem, you're very welcome. ;)

As a matter of interest, [i]Firefox[/i] rendered your

original code as one would have expected.

[i]coothead[/i]
×

Success!

Help @daveyerwin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...