Designating an empty area on the top border

How can I fix the issue where adding a border to my video results in space at the top?

.video-content {
    border: 10px solid #2f2f2f;
}
<div class="col-lg-12">
   <div class="embed-responsive embed-responsive-16by9 video-content">
      <video src="video/Portfolio-landing.mov" controls></video>
   </div>
</div>

Answer №1

It seems like the issue might be that the margin and padding properties are not set for the body element in your CSS. To fix this, you can add the following code:

body {
    margin: 0;
    padding: 0;
}

Answer №2

To achieve the desired layout, consider using display:inline-block; for the div as shown here:

<div class="col-lg-12">
    <div class="video-content">   
        <video class="fullscreen-bg__video" src="http://techslides.com/demos/sample-videos/small.webm" controls></video>
</div>

.video-content { border: 10px solid #2f2f2f; position:relative; display:inline-block; }

Answer №3

To resolve the issue, try setting the video element to display: block

.video-container video {
    display: block;
}

Answer №4

Don't forget to include CSS reset rules if you want to avoid unexpected behaviors.

*{
   margin:0px;
   padding:0px
 }

.video-content {
    border: 10px solid #2f2f2f;
}
<div class="col-lg-12">
   <div class="embed-responsive embed-responsive-16by9 video-content">
      <video src="video/Portfolio-landing.mov" controls></video>
   </div>
</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is it possible for asp.net to include <tbody id="blah" runat="server">?

Currently, I am dealing with a situation where I need to hide a <table> <tbody>..some content</tbody> <tbody id="sometimesHidden" runat="server">...</tbody> </table> Despite my efforts, the .cs code throws an ...

What is the best way to delete specific elements or text from a dialog box when it is closed?

I'm facing an issue with removing text in a dialog upon closing it. The page contains multiple dialogs, each with some forms inside. One form is for sending messages to users and the other is for updating user information. After submitting a form, a ...

Is Ursina the right choice for web development?

Looking for a method to compile Ursina for HTML5 using WebAssembly or another technology? I am seeking to make my Ursina Game compatible with Linux & Mac (and potentially Android/iOS with webview), but the current cross-platform compilation options for Py ...

Using jQuery to assign each name the value of the group of radio buttons

For instance: In the database, there are currently five names available (possibly more): ANGGIE, BOB, CHUCK, DEAN, EAST. Here is the HTML code snippet: <form name = "test"> <?php $num++; ?> <td> [each name in the database] </td> ...

Design a responsive layout featuring a div containing four buttons that incorporate text and logos using Bootstrap 5

Looking for help with a web application built using HTML/CSS/Bootstrap 5/JS and Rust/Actix-web? Check out the code here. The index page of the app features a navbar and a div containing four buttons in the center (vertically and horizontally aligned). The ...

Tips for Creating a CSS Radio Button in ASP.NET

I've recently developed a web application using asp.net and I'm facing an issue while trying to style the radio buttons using CSS like the example below: https://i.sstatic.net/k7qGB.jpg However, after applying this design, the radio buttons are ...

Is it possible to utilize LESS to dynamically read the width?

My LESS code looks like this: &.settings-prompt .panel { margin-left: -190px; width: 380px; height: 200px; } &.create-playlist-prompt .panel { margin-left: -165px; width: 330px; height: 180px; } I want the .panel to have ...

Tips on adding CSS to a React component

I've successfully converted an HTML file into a component designed to resemble a 7-segment LED display. I have imported the necessary CSS styles from the index.css file, but I am unsure how to properly apply these styles within the component. My atte ...

What could be causing the malfunction of the dropdown menu attached to my button?

I've been working on setting up a simple button in my Angular application that should display a dropdown menu with various options when clicked. I copied and pasted some Bootstrap template code, made some modifications to match the style of my app, bu ...

Unusual behavior observed in Angular 2 when handling button click events

In my .ts file, there are two straightforward methods: editLocation(index) {} deleteLocation(index) { this.locations.splice(index, 1); } The corresponding HTML triggers these methods when buttons are clicked: <button (click)="editLocation(i)" ...

Enhanced compatibility with Touch.radiusX feature on smartphone and tablet devices

Curious if anyone knows about the level of support for this property. I am currently using the PR0C0D1N6 app on an iPhone 4 and based on the specifications, when radiusX is not supported it should default to 1. However, in my case, radiusX is showing as un ...

Ways to implement a parallax effect by changing images within a specific div on scrolling with the mouse

First and foremost, thank you for taking the time to review my question. I am currently developing a website and I need to implement a vertical image transition effect within a selected division, similar to a parallax effect. Within this div, there are 3 ...

Overriding custom CSS with react-bootstrap styles

While attempting to utilize the react-bootstraps accordion component, I encountered the necessity of the import statement import "bootstrap/dist/css/bootstrap.min.css"; in order for the accordion to function properly. However, upon adding this ...

Creating a layout with a CSS div that has a height of 100

I've been utilizing this code to design the layout of my website. However, I've encountered an issue where the "left" and "right" divs are not displaying on the screen (they only show up when I set their height in pixels, not in percentages). Any ...

What is the method for adjusting the success button's color using SASS?

My current theme's success button is green, but I want to change it to yellow. How can I achieve this? In the _variables.scss file, the following lines are present: $btn-success-color: $btn-default-color !default; $btn-success-bg: ...

Revamping the pre-existing css of Firefox 11

Is there a way to remove the 8px margin from the body tag? I've attempted a few different solutions: * { padding:0; margin:0; } as well as html, body { padding:0; margin:0 !important; } and body { margin:-8px; } and even <body style="m ...

Storing website data for localization purposes on the web platform

I am currently working on a project to develop a website that displays the selected language page upon first visit. The idea is that when a user clicks on a language name, such as French, it will be stored in web/local storage. Then, when the user returns ...

The ng-html-to-pdf-save feature does not function properly when using Persian or Arabic characters

I am trying to utilize this module to print Persian content, but unfortunately, the characters are not displaying correctly. Here is the code snippet I am using: <script type="text/ng-template" id="patient_modal.html"> <div class="modal-heade ...

React Traffic Light Component: Colors Stuck After Timeout

I've been working on solving a React issue and followed a tutorial on YouTube. I'm using CodeSandbox for my project, but I'm facing a problem where the colors of the signal are not showing up and do not change after some time. I even tried u ...

What are the steps to produce a 3D picture with a stylish border?

Transforming an image into a painting with a 3D perspective and adding a frame to it can create a unique piece of art. To achieve the painted look: And for adding the frame: The provided code focuses on achieving the painted effect so far. To add the fr ...