Using Angular Material to create tabs and grid lists (md-tabs and md-grid-list

I'm having trouble getting the md-grid-list to appear inside an md-tab.

I copied the md-grid-list code from here and placed it under a series of dynamically generated tabs.

However, the grid list doesn't seem to be displaying on any of the tabs. Ideally, I would like the grid list to be positioned aligned left and top under the tab. I'm not very proficient in CSS...

You can view a sample fiddle of the issue here

<div>
  <md-tabs>
    <md-tab ng-repeat="tabname in tabs" label="{{tabname}}">  
      <md-grid-list md-cols-sm="1" md-cols-md="2" md-cols-gt-md="6" md-row-height-gt-md="1:1" md-row-height="2:2" md-gutter="12px" md-gutter-gt-sm="8px" >
        <md-grid-tile class="gray" md-rowspan="3" md-colspan="2">
          <md-grid-tile-footer>
            <h3>#1: (3r x 2c)</h3>
          </md-grid-tile-footer>
        </md-grid-tile>
        <md-grid-tile class="green">
          <md-grid-tile-footer>
            <h3>#2: (1r x 1c)</h3>
          </md-grid-tile-footer>
        </md-grid-tile>
        <md-grid-tile class="yellow">
          <md-grid-tile-footer>
            <h3>#3: (1r x 1c)</h3>
          </md-grid-tile-footer>
        </md-grid-tile>
        <md-grid-tile class="blue"md-rowspan="2">
          <md-grid-tile-footer>
            <h3>#4: (2r x 1c)</h3>
          </md-grid-tile-footer>
        </md-grid-tile>
        <md-grid-tile class="red" md-rowspan="2" md-colspan="2">
          <md-grid-tile-footer>
            <h3>#5: (2r x 2c)</h3>
          </md-grid-tile-footer>
        </md-grid-tile>
        <md-grid-tile class="green" md-rowspan="2" >
          <md-grid-tile-footer>
            <h3>#6: (2r x 1c)</h3>
          </md-grid-tile-footer>
        </md-grid-tile>
      </md-grid-list>
    </md-tab>
  </md-tabs>
</div>

Answer №1

I noticed that the tiles in the fiddle, particularly the tile footers, are blending in with the white background. To view them clearly, you'll need to scroll down the page.

If you're looking for a solution, you can try including md-dynamic-height within the <md-tabs> tag like this:

<md-tabs md-dynamic-height>
. This will help maximize the screen space allocated for your tab content.

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

Loading page with $rootScope variable - variable remains unset when changing states

Setting $rootScope.pageLoading = 1 in the router configuration is done like this: .state('app', { abstract: true, url: '', templateUrl: 'tpl/app.html', resolve: { loading: function($rootScope ...

Guide to choosing and unchoosing a div / button using angularJs

I am attempting to create a functionality where items are displayed in a div instead of a list. When an item is clicked, the background color of the div changes and the item is added to a column. Clicking on the item again will revert it back to its origin ...

Implementing a Typescript directive in AngularJS to create a class

After using AngularJS for quite some time, I decided to explore Typescript. I managed to convert most of my Angular code to Typescript and found it beneficial, especially when working with services. However, I am struggling to convert the following direc ...

How to align an element in the center using flexbox while considering the width of the display rather than the available

I need help centering an element that is 100px in width on the display. On either side of this element, there are elements that are 300px and 200px wide. I tried using flexbox to achieve this, but I ended up with two empty spaces or flexible-width element ...

Increasing the height of a DIV that is positioned beneath another DIV with a set height

My goal is to convey my message visually. I hope you can understand without too many words. The issue I am facing is that when trying to stretch a 100% height DIV under another DIV with fixed height, it does not stretch properly. If you want to experiment ...

Conceal a list of items within a div that has a particular class

This is a sample of my HTML code: <div class="row"> <div class="col-md-12"> <div class="scrollbox list"> <ul class="list-unstyled"> <li id="articulate.flute">articulate flut ...

Dynamically updating the scroll area in Ionic using real-time data

Hello, I am currently working on an Ionic project and have created a code pen for it. At the moment, the code pen just displays an image with two buttons for zooming in and out. However, I have encountered an issue. When I click on zoom in and scroll to ...

What steps are involved in integrating OpenCV into a JavaScript project?

After recently installing OpenCV via npm using this guide: https://www.npmjs.com/package/opencv I'm facing a simple question. How can I actually utilize the OpenCV library in my project? The site provides a face detection example code snippet: cv.r ...

Having trouble with jQuery's .animate() on a basic horizontal slider?

I attempted to customize this jQuery slider solution from Stack Overflow: (using the first solution - http://jsfiddle.net/sg3s/rs2QK/). Check out my modified version on jsFiddle here: http://jsfiddle.net/markrummel/KSHSX/. The slide-in effect for the DI ...

The issue with the background color being transparent is not being resolved

Looking for help with a Bootstrap 4 issue I'm experiencing. I have set a fixed background image using CSS on a webpage, and I want to stack multiple <div> elements one after the other with transparent spacing between them. The goal is to allow p ...

Keeping state between navigations in Ionic and AngularJS: A guide

In the process of developing my very first hybrid mobile application using Ionic and AngularJS, I have encountered a challenge that I am currently trying to resolve. The issue at hand involves maintaining the state of the graphical user interface between n ...

CSS: Only one out of three <div>'s has the styles applied in JSFiddle

When working on my project, I encountered an issue while trying to add CSS styles to three <div> structures with unique IDs. Strangely, making small changes to unrelated CSS caused elements to go from being stylized to losing their style. If you com ...

retrieve user photos from twitter using angular.js and firebase

As a newcomer to angular.js and Firebase, I am delving into editing code from an open-source script to expand my knowledge. I initially used a chat script with a Facebook login. However, I have decided to switch the Facebook login to a Twitter login, as F ...

Styling the Container Component in ReactJS

I need to apply some styling to the "Forms_formline__3DRaL" div (shown below). This div is generated by a component, but it seems that the style I want to add is being applied to the input instead of its parent div. How can I use ReactJS to set the style " ...

What is the best way to retrieve the height of a <DIV> element without factoring in the presence of a horizontal scrollbar with

I have created a unique jQuery plugin that involves utilizing two nested <DIV> elements. The outer div is set with a fixed width and overflow: scroll, while the inner div (which is wider) houses the content for scrolling purposes. Everything is fun ...

Changing variables within anonymous functions in javascript can be done by using the parameters passed into

Hello everyone, I'm currently working on a new JavaScript project and I've encountered an issue. I need to figure out how to change variables in anonymous functions. Can anyone help me with this? updateName : function(){ var firstNa ...

Is it possible to utilize rspec for conducting feature testing on an integrated rails-angular application?

My Rails-Angular application is very basic and integrated. It simply renders a link, fetching data from a GET request to Rails: 'use strict'; angular.module('angularRspec.controllers') .controller('FightersController', ...

Experiencing a JSONP issue with an 'Access-Control-Allow-Origin' error

When working with PHP, I often use the following code to echo JSONP formatted data: echo $_GET['callback'] . '('.json_encode($arr).')'; In my AngularJS (JavaScript) code, I make a GET request like this: $http.get('http ...

Another choice for object-fit:contain workaround for IE

Is there an alternative option to object-fit: contain that is compatible with Internet Explorer? Below is a snippet of my code: .cbs-Item img { height: 132px ! important; width: 132px ! important; object-fit: contain; <div class="cbs-Ite ...

Tips for adjusting text to fit within a container without needing to use overflow:auto

Is there a way to prevent text overflow in a container without using the overflow:auto property? I've come across plugins that automatically reduce the text size, but I'm not keen on that solution. What I want is for long words or URLs to wrap on ...