Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to add horizontal line in nativescript-angular html file

I tried "hr" tag in component html file in nativescript-angular. But it doesn't shown horizontal line in simulator. (tested with ios simulator)

  <StackLayout>
     hr>
     <Label horizontalAlignment="left" textWrap="true" text="Description" class="description-text"></Label>
     </StackLayout>
like image 618
Steve Avatar asked Sep 03 '18 12:09

Steve


2 Answers

Shouldn't that hr go as a class inside the StackLayout?

Like <StackLayout class="hr-light">...

Reference

like image 52
Dzhavat Ushev Avatar answered Sep 24 '22 17:09

Dzhavat Ushev


<Label class="line" text="About"></Label>

// To give the bottom border

.about-heading{
    font-size: 19;
    padding: 5 18;
    border-color: #3BEC9C;
    border-width: 0 0 2 0;
}

// To give the top border

.about-heading{
    font-size: 19;
    padding: 5 18;
    border-color: #3BEC9C;
    border-width: 2 0 0 0;
}
like image 29
ixhimanshu Avatar answered Sep 22 '22 17:09

ixhimanshu