primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Offsets for Grid CSS

Open paulswan opened this issue 9 years ago • 3 comments

I'm submitting a ...

[ ] bug report
[x] feature request 
[ ] support request

Expected behavior Similar to Bootstrap Offsetting columns: http://getbootstrap.com/css/#grid-offsetting

What is the motivation / use case for changing the behavior? It would be nice to have left and right aligned buttons on large screens without a big gap between them on a smaller screen.

paulswan avatar Jul 12 '17 02:07 paulswan

Dear @paulswan Did you look at PrimeNG's awesome grid CSS which includes vital features as nested or responsive positioning? https://www.primefaces.org/primeng/#/grid

Here, you can partition your screen as you want and align right or left each of your elements separately.

SefaMuratcanKatirci avatar Jul 14 '17 07:07 SefaMuratcanKatirci

Do you have a DataTable plunker I can start from?

ctrl-brk avatar Jul 14 '17 15:07 ctrl-brk

You can partition your row by using grid class in a div such as:

 <div class="ui-g">
    <div class="ui-g-6"></div>
    <div class="ui-g-6">
        <p-dataTable #dt [value]="cars">
              <p-column field="vin" header="Vin"></p-column>
               <p-column field="year" header="Year"></p-column>
               <p-column field="brand" header="Brand"></p-column>
               <p-column field="color" header="Color"></p-column>
         </p-dataTable>
   </div>
</div>

Here, we partitioned the screen into two part (by 12/6) and then used the second part. This is the simplest illustration. If you try something for yourself, I am sure you will cover this situation better.

SefaMuratcanKatirci avatar Jul 14 '17 17:07 SefaMuratcanKatirci