Is there a way to align the height of a standard column with the ng-include section to ensure a cohesive page display?

I have been working on my Angular app and have implemented ng-include to dynamically add content to a template within the page. The issue I'm facing is that this specific area ends up being longer than both the html and body elements where it resides.

Check out the JSFiddle here

html,
body {
  height: 100%;
}
#main {
  height: 100%
}
#left {
  background-color: grey;
  height: 100%;
}
#right {
  background-color: yellow;
  height: 100%
}
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js"></script>
<div id="main" class="row">
    <div id="left" class="col-sm-6 col-xs-6">
        <div id="sidebar">
            <p>Item 1</p>
            <p>Item 2</p>
            <p>Item 3</p>
            <p>Item 4</p>
            <p>Item 5</p>
        </div>
    </div>
    <div id="right" class="col-sm-6 col-xs-6">
        <div id="somethingLong">
            <div id="bigItem">
                <h2> My big Car </h2>

            </div>
            <div id="bigItem">
                <h2> My big house </h2>

            </div>
            <div id="bigItem">
                <h2> My big Paycheck </h2>

            </div>
            <div>
                <div ng-include src="'template.html'"></div>
            </div>
        </div>
    </div>
</div>
<!-- template -->
<script type="text/ng-template" id="template.html">
    <div>
        <h1>Angular Script</h1>
    </div>
    <div>
        <h1>Angular Script</h1>
    </div>
    <div>
        <h1>Angular Script</h1>
    </div>
    <div>
        <h1>Angular Script</h1>
    </div>
</script>

Is there a way to make sure my left sidebar matches the length of the right sidebar?

Answer №1

The issue at hand is not actually related to angularjs, but rather stems from a bug within Bootstrap. This bug results in the row class being styled as follows:

.row {
  margin-right: -15px;
  margin-left: -15px;
}

To resolve this issue, simply add the following CSS code:

.row {
  margin-right: 0px;
  margin-left: 0px;
}

By implementing this change, the problem will be fixed.

View the updated jsfiddle 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

Creating a personalized music player using an audio tag with HTML, CSS, and JavaScript

I am currently working on developing a unique music player from scratch without utilizing the "controls" tag within the audio element. My goal is to build something akin to the SCM Music Player. I've chosen not to use the SCM-provided player due to it ...

Enhance your SVG with a stylish border by adding a decorative

Is there a way to add a blue or black border that follows the curve of an SVG used as a divider? <svg width="100%" height="96px" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" prese ...

Elements resize based on their parent's and siblings' widths

I have organized the parent div and its three children divs. Presently, the third child is concealed. I've designated the width of the first child as 20% and desire for the second child to automatically take up the remaining width without explicit set ...

Can you navigate to HTML files using Vue router?

Hey there! I'm currently utilizing VueJS along with the webpack template. I've got a variety of components that I can easily showcase with Vue Router. However, the testing framework utilized by my team is Robot Framework and we typically create a ...

Uncovering data treasures on the web with BeautifulSoup: Extracting JSON files from DIV elements made simple

As I attempted to extract data from a website using standard class names for the required elements, I came across an interesting discovery. Near the top of the HTML code, there was what appeared to be a JSON file containing all the necessary information. ...

Can a video or image be displayed in HTML using an absolute path from a disk named E: while the localhost files are located in C:?

I'm attempting to construct a basic webpage utilizing HTML and PHP to display various videos, each video within its own videoplayer. The issue arises when I try to find the videos (they are stored in a folder on my secondary hard drive labeled E:&bso ...

Different ways to modify the underline and label color in Material-UI's <Select/> component

A while ago, I came across this useful demo that helped me change the colors of input fields. Here is the link: https://stackblitz.com/edit/material-ui-custom-outline-color Now, I'm on a quest to find a similar demo for customizing the color of selec ...

Acquiring a document from Mongoose using Angular

After successfully uploading a file and storing it in my MongoDB, I now need to implement the functionality to download this file from the same MongoDB. On the server-side, I am utilizing the GridFS module in Mongoose for both upload and download operation ...

After the form is successfully submitted, you can remove the required attribute

Upon clicking the submit button of a form, an input box is highlighted with a red border if empty. After successful jQuery AJAX form submission, a message "data submitted" is displayed and the form is reset causing all input fields to be highlighted in red ...

What's the best way to center align my tag vertically in this scenario?

I am struggling to center my text vertically in this scenario. Here is the structure I have: <section id='container'> <div id='title'> <h1>Title here.</h1> </div> </section> This ...

Incorporate CSS file into the head section or directly within the HTML section without the need for JavaScript

I'm facing an issue with adding a CSS file to my webpage using JavaScript code at the bottom of the page. When users disable JavaScript, the file cannot be added. Is there a way to include the CSS file in the page without relying on JavaScript? $(doc ...

Tips on incorporating the $ symbol into a pseudo element

Can I add a price using a pseudo element? h3:after{ content: " (+ $75)"; } <h3>price</h3> The CSS minifier is preventing the display of "$75". How can I work around this issue? ...

What are some ways in which I can utilize the Ember Handlebars helper?

Similar Question: Using logical operators in a Handlebars.js {{#if}} statement Below is the code snippet provided: {{#each dataArray}} <li>{{#isTrue idVal1 idVal2}} display some text1 {{else}} display some text2 {{/isTrue}} & ...

jQuery Super-sized Not Expanding Vertically

I am facing an issue with resizing a 1920x1200 background image using jQuery Supersized. Whenever I resize the browser, there is a gap that appears vertically instead of filling up to compensate for the width constraint. I have checked and copied the sett ...

Connecting CSS styles and images to my EJS templates on a distant Express server using Node.js (Ubuntu 18.04)

I have been hunting for a solution here extensively, but every attempt has failed. So, here's the issue I'm facing: I have created a basic Express server locally to display a static page until I finish full integration. The structure of my site ...

Performing a repeated action to choose each item from a dropdown menu

I attempted to streamline the process by creating id tags for each dropdown and implementing a loop to select each manufacturer without having to write an extensive amount of code. However, I encountered difficulties and was unable to find a solution. The ...

Tips for integrating external JavaScript libraries and stylesheets into a widget

I am currently working on developing a custom Javascript widget that requires users to insert specific lines of code into their web pages. This code will then dynamically add an externally hosted javascript file, allowing me to inject HTML content onto the ...

Firefox changes the sequence of form input attributes

Is anyone familiar with this issue and how to prevent it? I am using AJAX to populate a div with a form from a PHP file. The input element is generated in PHP as shown below: echo ('<input type="text" name="court_type_name" id="court_type_name_in ...

Ensuring the same height for the navigation bar and logo with aligned vertical text

I'm in the process of recreating a simple navigation menu and I've reached the section where I am encountering an issue with the list items. The orange li element is not filling up 100% of the width, and I also need the links to align in the midd ...

CSS styling failing to meet desired expectations

Two different elements from different panels are using the same CSS styles, but one displays the desired text while the other does not. The CSS file in question is named grid.css. To see the issue firsthand on my live website, please visit: I am uncertai ...