p-selectButton: set width of individual button

UI Components for Angular
Post Reply
fmjnax
Posts: 11
Joined: 24 Aug 2017, 02:42

19 Mar 2018, 02:14

Is there a way to set the width of each individual button within the group? I can set the width of the entire ui-selectbutton component, but the ui-buttons do not expand to fill the width (empty space).

JACrazy
Posts: 20
Joined: 19 Mar 2018, 17:48

19 Mar 2018, 17:55

You set it right in the html like so:

Code: Select all

<button pButton type="button" style="width:130px;"></button>
<p-button style="width:130px;"></p-button>

fmjnax
Posts: 11
Joined: 24 Aug 2017, 02:42

20 Mar 2018, 02:26

Thank you JACrazy. That seems to work fine for straight buttons, but I can't get it to work for p-selectButtons. Maybe I'm implementing it incorrectly. Here is the line I have for my html and a screenshot showing the section of the page.Upon inspection, setting the width to 57% does set the width of the div properly, but the buttons within the div don't grow with it.

<p-selectButton [options]="tileSetup" [(ngModel)]="selectedTileSetup" (onChange)="checkDesert($event)" [style]="{'width':'57%'}"></p-selectButton>

Image

huseyinT
Posts: 123
Joined: 27 Mar 2016, 13:05

21 Mar 2018, 22:04

Hi,

Could you look this link?

viewtopic.php?f=35&t=55023&p=165713#p165713


Greetings,

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests