Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 22nd, 2008, 02:59 PM
Authorized User
 
Join Date: Apr 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AspNetGuy
Default Font size of Header Text in DetailsView Control

I am new to ASP.NET. I started with ASP.NET 3.5 and Imar's book.

I can not affect the DetailsView header text, though I have tried everything I can think of.

I have inserted a DetailsView control. I have set the HeaderText to "Add User". I have set the HeaderStyle:CssClass to AdminUserViewTableHeaderStyle. The style is coded as follows:

.AdminUserViewTableHeaderStyle
{
    background-color: #CC0000;
    padding: 5px;
    color: #FFF;
    font-size: 23px;
        height: 35px;
    border: 1px solid #009;
}

I have also changed the FontSize directly in the control.

All to noavail. The generated HTML is as follows:

<tr class="AdminUserViewTableHeaderStyle" style="font-size:16pt;">
            <td colspan="2">Add User</td>

As you can see the styling is for the <tr> not for the <td>.

Should the above styling affect the "Add User" text size or not?
If not is their a property in the DetailsView control that affects the TD in the header?

If not how to I change the fontsisze of the text in the header?

Thanks for any help you might provide.

 
Old May 22nd, 2008, 03:25 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Looks like you're missing a dot. Class selectors are always prefixed with a dot in their definition:

.AdminUserViewTableHeaderStyle
{
 ...
}

<tr class="AdminUserViewTableHeaderStyle" style="font-size:16pt;">

If that doesn't help, look at style definitions you may have for td. Maybe you're overwriting the tr settings through a selector for the td.

Cheers,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old May 22nd, 2008, 03:44 PM
Authorized User
 
Join Date: Apr 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AspNetGuy
Default

Imar,

I am not sure where you saw a missing dot. The definition does have a dot prefix. However, your other comment sparked my memory. At the top of the stylesheet I DO have a TD definition with fontsize specified.

I added the following definition to override the earlier TD definition and all is well.

.AdminUserViewTableHeaderStyle td
{
   font-size: 18px;
}

Thanks for the memory jog.


 
Old May 22nd, 2008, 04:23 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Weird stuff. I can see the dot here on p2p, but not in my Gmail account. It also disappeared from my own reply. Strange....

Anyway, glad the td fix solved the problem.

Cheers,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Grid Column Header font problem suji VB.NET 0 June 12th, 2008 07:48 AM
set font for grid column header suji Visual Studio 2005 0 June 12th, 2008 07:40 AM
Excel Header Font nnmmss Excel VBA 3 March 28th, 2007 03:15 PM
how to get font ,color,font size of text in win32 satishsatao Visual C++ 0 April 5th, 2006 05:05 AM
Control text font with Window.Status? rweide HTML Code Clinic 7 April 11th, 2005 02:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.