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

NoRecordsTemplate Not Work With "text-align"

4 Answers 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mohammad Hajinezhad
Top achievements
Rank 1
Mohammad Hajinezhad asked on 01 Jun 2010, 10:28 AM
Hi dears,

I can't use "text-align:center" in ".rgNoRecords"

When I write the following code in my css file, just "color:Blue" acts !
.rgNoRecords 
    color:Blue; 
    text-align:center
 

When I use "NoRecordsTemplate" in my Grid, it work as well as !
<NoRecordsTemplate> 
    <div style="text-align:center; color:Blue">No records to preview</div> 
</NoRecordsTemplate> 
 

But I don't want use "NoRecordsTemplate".
Please someone help me.

Best Regards,
M.Hajinezhad



4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Jun 2010, 06:38 AM
Hello Hajinezhad ,

I hope the following style will help you in centering the "No Records" text.

CSS:
 
    <style type="text/css"
        .rgNoRecords td 
        { 
            colorred
            text-aligncenter !important; 
        } 
    </style> 


-Shinu.
0
Mohammad Hajinezhad
Top achievements
Rank 1
answered on 03 Jun 2010, 10:12 AM
Hi Shinu

Thanks for your attention, your guide was so useful.
But I don't understand "!important" part, I 'm a beginner in web programming and so confuse.
Could you explain more.

Best Regards,
Mohammad
0
SamJ
Top achievements
Rank 1
answered on 03 Jun 2010, 12:10 PM
Hi,

You can check the below article for more information on what does !important means in CSS:

http://www.telerik.com/community/forums/aspnet-ajax/grid/norecordstemplate-not-work-with-text-align.aspx

Regards,
SamJ
0
Mohammad Hajinezhad
Top achievements
Rank 1
answered on 03 Jun 2010, 12:48 PM
Hi SamJ

Thanks in advance, for your attention.

Best regards,
Mohammad
Tags
Grid
Asked by
Mohammad Hajinezhad
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mohammad Hajinezhad
Top achievements
Rank 1
SamJ
Top achievements
Rank 1
Share this question
or