 |
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
|
|
|
|
|

June 5th, 2008, 07:50 AM
|
|
Authorized User
|
|
Join Date: Sep 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

June 5th, 2008, 10:48 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

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

June 6th, 2008, 12:36 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

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