Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 22nd, 2008, 02:59 PM
Authorized User
 
Join Date: Apr 2008
Location: , , .
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.

  #2 (permalink)  
Old May 22nd, 2008, 03:25 PM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 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.
  #3 (permalink)  
Old May 22nd, 2008, 03:44 PM
Authorized User
 
Join Date: Apr 2008
Location: , , .
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.


  #4 (permalink)  
Old May 22nd, 2008, 04:23 PM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 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.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.