Shorten border length by a percentage?

Hi guys.

Hope you all good and surviving the crazy lockdown.

Anyways, I need some help shortening borders on each side as per the screenshot on this link: https://prnt.sc/semu3j

My approach would have been to create two drive and strategically place them behind the video placeholder. Is there a better way to accomplish this?

I’m having trouble understanding what the question is? What in this picture are you trying to move, and how are you trying to move it?
What does your code look like currently?

You could use ::before and ::after on a div that is around the video to create two rectangular blocks and absolutely place them into position as required. Use z-index to move the blocks beneath the video (only positioned elements obey z-index).

I won’t give code as its pretty straight forward but if you do want code then supply the html you have so far :slight_smile:

3 Likes

Sweet. I didn’t think of pseudo-classs selectors for some odd reason… :wink:

3 Likes

I did a demo anyway :slight_smile:

2 Likes

Thank you @PaulOB

It seems like the embed didn’t work, here’s the direct link for anyone whoever needs it: https://codepen.io/paulobrien/pen/jObKEXW

1 Like

(Off topic)
In case you have restricted Javascript or http requests you need to allow the Codepen domains.
(/Off topic)

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.