Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 June 5th, 2008, 07:50 AM
Authorized User
 
Join Date: Sep 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Formatting Question in the BugBase

I have never use the HTML tag Fieldset before. I came across it in the BugBase chapter (I have been skipping around the book). The code in the Default.aspx reporting page uses the Fieldset tag

         <fieldset style="width: 450px;">
        <legend>Bugs filed in the period</legend>

When I run the page the color of the text is black instead of the default color Blue. Perhaps I missed it, but I can't seem to figure out how you changed the default text color. I would appreciate it if you could show me how to you did this.

Thanks

 
Old June 5th, 2008, 10:48 AM
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,

What default of blue are you referring to? I think the default is black.

Anyway, you can style the <legend /> element as demonstrated by the following example:

<style type="text/css">
.Red
{
  color: red;
}
</style>
...

<fieldset>
  <legend>Bugs filed in the period</legend>
</fieldset>

<fieldset>
  <legend class="Red">Bugs filed in the period</legend>
</fieldset>

Hope this helps,

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 June 6th, 2008, 10:00 AM
Authorized User
 
Join Date: Sep 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

First I'd like to say thanks for getting back to me so fast. I had expected the Legend to display in blue because I read somewhere that Blue was the default. So I lifted some code from BugBase and sure enough the Legend was in Blue. Since I prefer the Legend to be Black like it displays in BugBase, I went to the BugBase project to see how you made it Black. I thought that perhaps this had something to do with one of your CSS files. While I can and will style the colors as you suggested I am still at a loss as to why the Legend in BugBase displays in Black, not Blue. Here is the code that I borrowed and tweaked slightly from BugBase. If you run it the Legend will appear in Blue. I am curious as to why this is happening. I hate mysteries.

Thanks

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FieldSetTester2.aspx.cs" Inherits="FieldSetTester2" Title="Untitled Page" %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <fieldset style="width: 480px">
    <legend>Bugs filed in the period</legend>
     <table style="width: 450px" border="0">
     <tr>
    <td colspan="2" class="Label">From<asp:Label ID="label1" runat="server" />
    </td>
    </tr>
      <tr>
    <td colspan="2" class="Label">To<asp:Label ID="label2" runat="server" />
    </td>
    </tr>
     </table>
    </fieldset>
  </div>
    </form>
</body>
</html>




 
Old June 6th, 2008, 12:36 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,

The answer is in Core.css in the CSS folder:

*
{
  font-family: Tahoma, Verdana, Helvetica, Arial;
  color: #000;
}

* applies to all elements. Color: #000 then gives all elements a black color. Changing it to this:

*
{
  font-family: Tahoma, Verdana, Helvetica, Arial;
  color: Red;
}

will color everything (including <legend /> elements) to red, unless overridden elsewhere.

Hope this helps,

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 June 6th, 2008, 01:41 PM
Authorized User
 
Join Date: Sep 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. This was driving me crazy. I hate not being able figure things out. I appreciate the help. As usual, your help was not only timely, but informative.

 
Old June 6th, 2008, 01:45 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome

Instant results - Instant answers. That's how it works here at Wrox.com.... ;)

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
Question about the Name Value Class used BugBase mikener BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 June 26th, 2008 07:04 AM
Question about formatting Nostromo77 ASP.NET 2.0 Basics 3 June 10th, 2008 04:14 PM
BugBase: .CCS question rjd BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 November 21st, 2006 05:21 PM
text formatting question dadoonan BOOK: Beginning ASP 3.0 1 November 15th, 2004 02:12 AM
Beginner - Datagrid formatting question badgolfer VB.NET 2002/2003 Basics 1 November 18th, 2003 01:15 PM





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