Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to set font size in repeater control in ASP.Net?

Posted on 2011-02-25
2
Medium Priority
?
1,402 Views
Last Modified: 2012-06-27
I am using CSS style sheet to style my repeater control. It is somehow not setting the font size. How can I set font size in my repeater control?
STYLE SHEET
-------------------
div.repeater
{
    width:auto;
    height:125px;
    overflow:scroll;
    font-size:12px;  
    font-weight:800;  
}
.reptable
{
    width : 100%;
    border : 1px solid #ffffff;
    background-color : #cccccc;
    font-size:12px;  
    font-weight:800;
}
.reptableheadercell
{
    border-bottom : 1px solid #ffffff;
    border-right : 1px solid #ffffff;
    background-color : #4B6C9E;
    color : #ffffff;
    font-size:12px;  
    font-weight:800;
}
.reptablehdrcell
{
    border-bottom : 1px solid #ffffff;
    border-right : 1px solid #ffffff;
    background-color : #4B6C9E;
    color : #ffffff;
    width:auto;
    font-size:12px;  
    font-weight:800;
}
.reptableheadercell td
{
    color : Black;
    padding-left : 5px;
    padding-right : 5px;
    font-size:12px;  
    font-weight:800;
}
.reptablerowcell1
{
    color : Black;
    border-bottom : 1px solid #ffffff;
    border-right : 1px solid #ffffff;
    background-color : #eeeeee;
    color : #000000;
    font-size:8px;  
    font-weight:800;
}
.reptablerowcell1 td
{
    color : #000000;
    padding-left : 5px;
    padding-right : 5px;
    font-size:8px;  
    font-weight:800;
}
.reptablerowcell2
{
    color : #000000;
    border-bottom : 1px solid #ffffff;
    border-right : 1px solid #ffffff;
    background-color : #cccccc;
    font-size:8px;  
    font-weight:800;
    }
.reptablerowcell2 td
{
    color : #000000;
    padding-left : 5px;
    padding-right : 5px;
    font-size:8px;  
    font-weight:800;
}

ASPX page
----------------
<div class="repeater">
      <asp:Repeater ID="rep" runat="server">
            <HeaderTemplate>
                     <table  width="100%" class="reptable">
                            <tr align="center" class="reptable">
                                <td class="reptableheadercell">column1</td>
                                <td class="reptableheadercell">column2</td>

                     </tr>  
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr align="center">
                        <td class="reptablerowcell1"><%# DataBinder.Eval(Container.DataItem, "column1")%>
                        </td>
                        <td class="reptablerowcell1"><%# DataBinder.Eval(Container.DataItem, "column2")%>
                        </td>
                        </tr>
                        </ItemTemplate>
                        <AlternatingItemTemplate>
                        <tr align="center" class="reptablerowcell2">
                        <td class="reptablerowcell2 td"><%# DataBinder.Eval(Container.DataItem, "column1")%>
                        </td>
                        <td class="reptablerowcell2 td"><%# DataBinder.Eval(Container.DataItem, "column2")%>
                  </td>
                        </tr>
                        </AlternatingItemTemplate>
                        <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>  
            </div>
0
Comment
Question by:reach_prgmmer
2 Comments
 
LVL 4

Accepted Solution

by:
jmnf earned 2000 total points
ID: 34984454
different font size for different child elements of the repeater? or

repeater *
{
    font-size: 12px;
    font: 12px Arial; /* just in case you need to override "font:" styling */
}
0
 

Author Closing Comment

by:reach_prgmmer
ID: 35010325
Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question