I am using the ionic beta and want to write a simple calculator app for learning. My first problem now is that I can't change the height of any buttons:
The buttons are placed in an <ion-grid>
element:
<ion-content class="mainpage" scroll="false">
<ion-grid>
<ion-row class="result">
<ion-col><p class="result">0</p></ion-col>
</ion-row>
<ion-row>
<ion-col width-50><button large round full class="myButton">AC</button></ion-col>
<ion-col><button large round full class="myButton">+/-</button></ion-col>
<ion-col><button large round full class="myButton">/</button></ion-col>
</ion-row>
<ion-row>
<ion-col><button large round block outline class="myButton">7</button></ion-col>
<ion-col><button large round block outline class="myButton">8</button></ion-col>
<ion-col><button large round block outline class="myButton">9</button></ion-col>
<ion-col><button large round full class="myButton">*</button></ion-col>
</ion-row>
<ion-row>
<ion-col><button large round block outline class="myButton">4</button></ion-col>
<ion-col><button large round block outline class="myButton">5</button></ion-col>
<ion-col><button large round block outline class="myButton">6</button></ion-col>
<ion-col><button large round full class="myButton">+</button></ion-col>
</ion-row>
<ion-row>
<ion-col><button large round block outline class="myButton">1</button></ion-col>
<ion-col><button large round block outline class="myButton">2</button></ion-col>
<ion-col><button large round block outline class="myButton">3</button></ion-col>
<ion-col><button large round full class="myButton">-</button></ion-col>
</ion-row>
<ion-row>
<ion-col width-75><button large round block outlin class="myButton"e>0</button></ion-col>
<ion-col><button large round full class="myButton">=</button></ion-col>
</ion-row>
For the rows I set height: 100%;
manually and it worked but the buttons don't stretch with the same attributes. I want them to fill the rows height.
Edit:
Here's the CSS:
ion-grid
{
height: 100%;
}
ion-row
{
height: 100%;
}
.myButton
{
height: 100%;
}
.result
{
color: white;
text-align: center;
font-size: 42px;
background-color: #00AFFF;
width: 100%;
height: 100%;
}