This is a migrated thread and some comments may be shown as answers.

Radgrid center of page ?

3 Answers 833 Views
Grid
This is a migrated thread and some comments may be shown as answers.
aykut
Top achievements
Rank 1
aykut asked on 01 Oct 2011, 04:17 PM
Dear friends,

maybe this will sound crazy but I cannot center radgrid on page horizontally. I tried to use divs with text-align attributes, aoto margin attributes but no luck. I almost tried every single thing I found on google to "center something on page".

I did that using tables with align="center" property but this time every data in every column in radgrid cetered. please help, I'm going crazy with so simple thing !!

3 Answers, 1 is accepted

Sort by
1
Princy
Top achievements
Rank 2
answered on 03 Oct 2011, 06:57 AM
Hi aykut,

You can use the margin style to make the Grid center. Here is the sample CSS.

CSS:
<style type="text/css">
      .gridcss
      {
          margin-left:auto !important;
          margin-right:auto !important;
      }
</style>

Note : You can specify the width of the RadGrid.

Thanks,
Princy.
0
aykut
Top achievements
Rank 1
answered on 04 Oct 2011, 05:50 PM
sorry, it isn't working...
1
aykut
Top achievements
Rank 1
answered on 07 Oct 2011, 10:05 AM
I got the solution. Its because of misspelled div tags, etc. Correct and full usage is:

    <style type="text/css">
        div.RadGrid
        {
            margin-left: auto !important;
            margin-right: auto !important;
        }
    </style>
Tags
Grid
Asked by
aykut
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
aykut
Top achievements
Rank 1
Share this question
or