Issue with row-class functionality in Angular template

Everything seems to be working smoothly with my current template.

However, I am facing an issue when trying to separate individual courses (or products) into components, as the row class is not functioning properly and causing the items to stack on top of each other...

Here is the code I am using:

<div class="col-lg-9">
    <div class="row">
        <app-single-course></app-single-course>
        <app-single-course></app-single-course>
    </div>
</div>

Update

This is the code without the single component, and it works perfectly when the content appears side by side:

            <div class="col-lg-9">
            <div class="row">

                <div class="col-lg-4 col-md-6">
                    <div class="single-course-inner style-two">
                        <div class="thumb">
                            <img src="assets/img/course/2.png" alt="img">
                            <div class="rating">4.9/5 <i class="fa fa-star"></i></div>
                            <a href="#" class="bookmark"><i class="fa fa-bookmark-o"></i></a>
                        </div>
                        <div class="details">
                            <div class="meta">
                                <div class="row">
                                    <div class="col-6">
                                        <p>5,957 students</p>
                                    </div>
                                    <div class="col-6 text-right">
                                        <p>01h 49m</p>
                                    </div>
                                </div>
                            </div>
                            <h5><a href="#">Motion Graphics: Create a Nice Typography Animation</a></h5>
                            <div class="price-inner">
                                <div class="row">
                                    <div class="col-6">
                                        <p>$33.99</p>
                                    </div>
                                    <div class="col-6 text-right">
                                        <a href="#"><i class="fa fa-shopping-cart"></i></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>

Answer №1

One topic that I believe warrants discussion is the bootstrap grid system. It's essential to remember that the col class should be nested within the row class; otherwise, your items will stack "under each other". For more detailed documentation and examples, please visit: https://getbootstrap.com/docs/4.5/layout/grid/

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

Bug allows unauthorized access to password in Bootstrap Password Revealer

Whenever I try to reveal a Bootstrap password using the eye button, my PC freezes. Strangely, an input is automatically added even though there are no codes for it. This auto-increasing input causes my browser to hang and eventually crashes my entire PC. C ...

difficulties arise when adjusting font size in html and css

When I first created an all HTML/CSS website, I used clickable images as a menu that scaled perfectly on all monitors and browsers. Now, for my new project, I wanted to use a background image for the menu with hyperlinked text on top. I thought setting the ...

Can you provide instructions on how to center a button on a webpage?

Utilizing twitter bootstrap and its cover example as a foundation, I have incorporated additional input fields and am striving to center the second one (email) horizontally. Despite my attempts to use .center-block and .text-center on various div elements, ...

Issues with button padding in Firefox and Opera

Having an issue with the alignment of my buttons in HTML. In Opera, the button appears centered vertically, but in Firefox it seems like the text is slightly lower, messing up the design of my website. Below is the HTML code for the button: <input ty ...

Is the side tab overflowing the window due to its absolute positioning?

My browser window has a side tab that slides in when clicked using jQuery. The issue I'm facing is that the tab overflows the body due to its absolute positioning. However, the overflow stops when the tab is pulled in by jQuery. It only happens when t ...

Unable to confirm the version of Angular

I am currently using node version 10.14.1 and npm version 6.4.1 with angular version 7.0.3 installed. However, when I try to check the angular version by running the ng --version command, I encounter an error message in the command prompt. C:\Users&b ...

Are there any instances where CSS is overlooking certain HTML elements?

In the following HTML code snippet, the presence of the element with class ChildBar is optional: <div class="Parent"> <div class="ChildFoo"></div> <div class="ChildBar"></div> <!-- May ...

Step-by-step guide for installing @ng-select when upgrading to Angular 10

There seems to be an issue with the package "@ng-select/ng-select" that is causing compatibility errors. I encountered this error while trying to update from Angular 8 to Angular 10. Check out the screenshot for more details: click here ...

Alert displayed at the center of the browser when the value surpasses the specified number

My webpage retrieves SNMP data using PHP and displays it with HTML, color-coding the values. I want to add a pop-up alert when a value exceeds a certain number. I have attempted different jQuery solutions without success. The PHP code to get the value: ...

Optimize the height of embedded Linkedin posts for a seamless viewing experience without the need for scrolling

I have noticed that in LinkedIn embedded posts on my page, each post has a different height and there are scrolls. Is there a way I can make the height dynamic according to the post height? <iframe src="https://www.linkedin.com/embed/feed/update/ur ...

What is the recommended method for incorporating a frontend npm package that includes both CSS and JavaScript?

Recently, I've started using NPM and Gulp in my workflow. Up until this point, I've only dealt with NPM packages that consisted of either only JavaScript or CSS/SASS. Typically, I would either copy the package to a vendor directory to work with i ...

Tips for stopping TypeScript code blocks from being compiled by the Angular AOT Webpack plugin

Is there a way to exclude specific code from Angular's AOT compiler? For instance, the webpack-strip-block loader can be utilized to eliminate code between comments during production. export class SomeComponent implements OnInit { ngOnInit() { ...

execute several actions within a single effect

I'm trying to find a way to combine multiple actions into one effect in Angular. Currently, I have to create two separate effects to achieve this: // first effect @Effect() action1$ = this.actions$ .ofType(CoreActionTypes.MY_ACTION) .map(res => ...

The HTML element update event was not triggered due to the excessive load of a JavaScript function

I am currently running a JavaScript function that is quite CPU intensive. To provide visual feedback to users when it starts and stops, I am attempting to display a badge on the webpage. Below is the code snippet: function updateView() { console.log(1 ...

Can an IonChange event be triggered from a component in Ionic 3?

Currently, I am working on developing an application that involves multiple forms. In most instances, when a user navigates back from the Confirmation view to the Form view to modify their entered data, it is essential for the form to retain the previously ...

What is the best way to adjust the height of a row in a Material UI table using CSS

I've been attempting to establish a row height of 30px for a table (https://material-ui.com/components/tables/), but it seems that the minimum I can set is 53. Why is this restriction in place? How can I adjust the row height to 30px using CSS based ...

Prevent border duplication in CSS and retain border visibility

Check out this fiddle where I have three divs with a border-width of 2px. Originally, the issue was that each div's border gets duplicated in between, resulting in a total border-width of 4px. To solve this, I applied a margin-top of -2px to each div, ...

Can you explain the significance of the '#' symbol within the input tag?

I was reading an article about Angular 2 and came across a code snippet that uses <input type='text' #hobby>. This "#" symbol is being used to extract the value typed into the textbox without using ngModal. I am confused about what exactly ...

Always maintaining a responsive and square aspect ratio div

I am developing a CSS and JavaScript-based game that requires the game field to be square and adjust its width and height based on the height of the viewport. In case the viewport width is smaller than the height, I need the field size to adapt while maint ...

Rearranging the export order in a barrel file for Angular 2 services can have a significant impact on dependency

After spending some time puzzling over this issue, I'm reaching out for some assistance. In my development workflow, I store all of my core service files in a shared folder that I then combine into a single file named common.ts. These services are i ...