Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230629

Customise Ionic Cards

$
0
0

@robinyo’s suggestion of grids is the easiest and best for someone new to Ionic.

If & when you want to customize your layout based on the end-user’s screen size (ie: to have a different layout for phones vs tablets vs landscaped tablets vs laptops, etc), look into CSS for responsive layouts.

Your *.scss file will look like this:

    @include max-width(1100px) {
        .myCard {
            flex-basis: 50%;      // medium screens get 2 columns (50% row allocation)
    		//background-color: green;
    	}
    }

    @include max-width(600px) {
        .myCard {
            flex-basis: 100%;              // small screens get 1 column (100% row allocation)
            //background-color: blue;
        }
    }

Good luck,
Ryan


Viewing all articles
Browse latest Browse all 230629

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>