Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Align text right Html Ionic

I'm trying to align text in Html but it doesn't work and I do not know why. I'm using Ionic Framework.

My code is:

<ion-list>
   <ion-item>
      <b>Name</b> <p align="right"> {{paciente.name}}</p>
   </ion-item>
   ....
</ion-list>

and it looks like this: enter image description here

but I want all text int the same line, and I do not know how to get that.

like image 293
Nestoraj Avatar asked Dec 10 '22 21:12

Nestoraj


1 Answers

See this demo: http://play.ionic.io/app/b477ea2f5623
In ionic items, if you write any text within span with item-note class then it will be aligned to right.This is built in class by ionic, your code will be like this :

<ion-item>
  <b>Name</b> <span class="item-note"> {{paciente.name}}</span>
</ion-item>

See more tricks with ionic items provide by built in classes, see this Documentation

like image 184
Mudasser Ajaz Avatar answered Dec 15 '22 00:12

Mudasser Ajaz