Navigating through row items horizontally can be achieved by scrolling them to

For a project, I am attempting to recreate the layout of a website similar to Netflix. In Netflix, each category displays videos in a horizontal row, with most of the videos located off-screen and requiring users to click an arrow button to scroll through the content.

I tried replicating this by using Bootstrap Cards as placeholders for the videos and utilizing flexbox to distribute the cards horizontally. I also considered implementing a carousel feature but have not found a suitable solution yet.

Does anyone have suggestions on how to achieve this without relying on JavaScript?

Thank you.

body {
margin: 0;
padding: 0;
}

.contain {
display: flex;
}

.card {
width: 200px;
margin: 5px;
margin-top: 5px;
border-radius: 0;
position: relative;
top: 5px;
left: 5px;
}

.card-img-top {
border-radius: 0;
}

.card-body {
height: 100px;
font-size: 50%;
text-align: center;
}

.list-group-item {
font-size: 50%;
border-radius: 0;
}
<div class="contain">
<div class="card" >
<img src="https://farm6.staticflickr.com/5089/5342837785_b579b38145_o.jpg" class="card-img-top" alt="...">
<div class="card-body">
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
<ul class="list-group list-group-flush">
    <li class="list-group-item">Cras justo odio</li>
    </ul>
</div>

...Repeat the above code snippet for additional cards...

</div>

Answer №1

Give this a try, it should do the trick.

    .wrap {
      display: flex;
      justify-content: space-around;
      (your unique CSS styles here)
    }

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

The Vue/Vuetify wrapper component does not automatically pass on the `hide-details` parameter to the input component

I recently crafted a custom wrapper for the v-select input using Vuetify. Along with custom properties, I utilized the v-bind="$props"attribute to inherit all props. Upon testing, I observed that while this method applies to most props, it doesn ...

What is the frequency of page rendering in Angular 2 before displaying it?

I've been working with Angular 2 on a project lately. In my template, I have a simple div that triggers a function in my .ts file to display basic text like so: <div>{{ test() }}</div> test(): void { console.log("Test text") ...

Customizing the appearance of the datatable search bar

I've been attempting to customize the appearance of the "Search" text and input field, but they are not responding to my CSS changes. Upon inspecting the elements, I noticed that the datatable filter and info sections have similar styles. Although my ...

What is the best way to customize the appearance of an XML snippet using Greasemonkey?

I am attempting to customize an XML fragment retrieved from a server response using a Greasemonkey script. Take a look at this sample XML fragment from w3schools.com: <note> <to> Tove</to> <from>Jani</from> <heading ...

Finding the identifier of a dynamically generated text input using PHP

I am looking to create a page similar to this On this page, users can add multiple entries for date, site, start time, end time, and hours amount by clicking the + button, and remove entries using the - button. How can I retrieve the input values in PHP? ...

What is the reason for the additional space and irregular alignment of my divs when utilizing the 960 grid system?

One issue I'm facing is that elements within divs are aligning randomly without responding to any alignment tags. Additionally, some divs are creating extra space above or below their elements. I am using the 960 grid system and have not made any chan ...

Showing a tooltip on the right side of a control with an arrow pointing towards it in a colored

Can someone help me with displaying a tooltip to the right end of a control, with the arrow facing the same direction and changing the background color of the arrow to red? Here is my attempt so far <input id="age" title="test tooltip"> $( documen ...

I am interested in incorporating a delete button within my Angular application

I am working on an Angular App and I need to implement a remove button for a div element. Currently, I have an add button function in my ts file: uploads = []; addUp() { this.uploads.push(this.uploads.length); } I attempted to create the remove b ...

Exploring the Power of Promise Chaining: Understanding the Distinction between .animate and setTimeout

I am seeking clarification on how promises work in JavaScript. I am struggling to understand the difference between executing a chain composed of jQuery.animate and setTimeout. For example, if I write the code below: var promise = new Promise(function(re ...

What is the best way to initiate a change event using JavaScript?

I am attempting to enable my 4th checkbox automatically when there is a new value in the textbox (myinput). If the textbox is empty, I want to disable it. Currently, you have to tab out before the change event is triggered. Also, how can I check for an e ...

Looking to eliminate the vertical spacing of the <hr> tag?

Summary: For a quick solution, just click on the image at the bottom. Greetings to everyone! I am facing an issue with two <div> elements that I need to separate using a <hr class="separator"> element. Below is the CSS code for the ...

Display scroll bars over the position:absolute header

My container has content that exceeds its size in both directions. To see the issue, try scrolling horizontally and vertically on the table available here: The vertical scrollbar is visible as desired, except that it gets hidden behind the table header un ...

Avoiding clashes between CSS styles in web applications

As I work on developing a web application that can be embedded on external websites, one of the challenges I am facing involves constructing dialogues with their own unique stylesheets. This could potentially lead to conflicts if both my dialogue container ...

Eliminating the admin-bar.php styling in a WordPress theme

Currently, I am working on developing my very first WordPress template. I have encountered an issue with the top navigation being pushed down by a specific style rule: html { margin-top: 32px !important; } After investigating further, I discovered that t ...

A complete div component with a minimum height that is sandwiched between a fixed size header and

I'm currently facing a challenge with setting up my webpage due to the height of my elements causing a bit of a frenzy. Specifically, I have a specific layout in mind: At the top, there should be a header that has a fixed height (let's say 150p ...

React Side Panels that Collapse and Expand

Apologies if this task seems simple, as I am new to transitioning to React. My current application is primarily built with JavaScript, CSS, and HTML, and I am now looking to migrate it to React. There is a full-length horizontal side panel that is initiall ...

What is the best way to retrieve the form element in JavaScript that houses a popup window?

Can someone help me with accessing the input using id="namesignup" in javascript? I have tried: console.log("Result :"+ $$('.popup-signup-email #namesignup')); document.getElementById(namesignup) But neither of them seem to be working. Is ther ...

Shuffling specific table cells to exchange positions

I am attempting to create a script that will allow certain td elements (but not all) in different tr elements to switch places with the ones directly above or below them. My goal is to only target the last 3 td elements in each row, rather than the entire ...

Email-box appears in a seemingly "random" location

I am currently engrossed in my informatics project, which involves building a sample dating site. However, I have encountered some difficulties in getting everything to align correctly. Everything was working fine until my email box appeared in the wrong p ...

How can you specify a "default" value for history.pushState and replaceState?

What value should be used in the title param for browsers to use their default settings? In Safari 5.1.7 (7534.57.2), using either null or undefined as the title param defaults to the browser's settings. However, Opera 12.16 interprets "null" and "u ...