Next.js Discord

Discord Forum

Unable to round corners

Unanswered
ByteWizard posted this in #help-forum
Open in Discord
I am using next-video but unable to round corners of video how to do it?

49 Replies

<div className="w-full rounded-md overflow-hidden relative aspect-video">
        <div className="absolute inset-0 w-full h-full rounded-md overflow-hidden pointer-events-none">
          <Video
        src={heroVideo}
        autoPlay
        loop
        controls={false}
        className="w-full h-full object-cover"
        style={{ width: "100%", height: "100%", objectFit: "cover" }}
          />
        </div>
      </div>
I tried this
But video corners are not getting round
its rendering video component
I am applying css to it but not working
1 min
checking
yeah
Which image are you referring to
in background
yeah this
i want it to be rounded
the photo has bit of margin at the top and bottom
yeah
how do i remove it
video*
its by default
if there is a 50px radius, this is how it'll look
@ByteWizard how do i remove it
That seems to be in the video itself
@Anay-208 | Ping in replies That seems to be in the video itself
i did this
<div className="w-full rounded-md overflow-hidden relative aspect-video">
        <div className="absolute inset-0 w-full h-full rounded-md overflow-hidden pointer-events-none">
          <Video
        src={heroVideo}
        autoPlay
        loop
        controls={false}
        className="w-full h-full object-cover"
        style={{ width: "100%", height: "100%", objectFit: "cover", borderRadius: "5rem", alignContent: "space-between" }}
          />
        </div>
      </div>
style={{ width: "100%", height: "100%", objectFit: "cover", borderRadius: "5rem", alignContent: "space-between" }}
changed this line
corners are round from upside
from down its not
what is making here margin?
The video has a margin
@Anay-208 | Ping in replies The video
nah video doesnt have any margins
Can you send the video once
see i made bg black
video is ok
Wait @ByteWizard try removing height property
width*
its just <Video /> component who is making margin
with width unchecked, it works fine
@Anay-208 | Ping in replies Try removing width related classes
yeah but this thing is done by next-video component
how do i override it
You’ve a class of w full here on video
@Anay-208 | Ping in replies Here
i removed it still not worked

 <div className="aspect-video rounded-md overflow-hidden relative bg-black">
  <Video
    src={heroVideo}
    autoPlay
    loop

    controls={false}
    muted
    playsInline
  />
</div>
ig i need to make changes in global css