why isn't this css applyed?

J

Jeff

ASP.NET 2.0

Below is a css, skin and a markup part. I wonder why the #compose .desc
class isn't applyed to the TableCell object (cssClass=desc). This works if I
only use .desc (remove the #compose word from the css class definition)...
In the markup below the css class is defined in the skin file. I even tryed
to set cssClass in the markup and it had the same problem - the css class
wasn't applied

Why isn't #compose .desc applyed?

CSS:
#compose .desc
{
font-family:Verdana;
font-weight:bold;
font-size:xx-large;
background-color:Gray;
}

SKIN:
<asp:TableCell SkinID="desc" runat="server" width="100px" CssClass="desc" />
<asp:TableCell SkinID="field" runat="server" width="100%" />

MARKUP:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Compose.aspx.cs"
Inherits="Templates_Compose" EnableTheming="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<asp:Table ID="compose" runat="server">
<asp:TableRow>
<asp:TableCell SkinID="desc">Recipient</asp:TableCell>
<asp:TableCell SkinID="field">Recipient</asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:Content>


Jeff
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Jeff said:
ASP.NET 2.0

Below is a css, skin and a markup part. I wonder why the #compose .desc
class isn't applyed to the TableCell object (cssClass=desc). This works if I
only use .desc (remove the #compose word from the css class definition)...
In the markup below the css class is defined in the skin file. I even tryed
to set cssClass in the markup and it had the same problem - the css class
wasn't applied

Why isn't #compose .desc applyed?

CSS:
#compose .desc
{
font-family:Verdana;
font-weight:bold;
font-size:xx-large;
background-color:Gray;
}

SKIN:
<asp:TableCell SkinID="desc" runat="server" width="100px" CssClass="desc" />
<asp:TableCell SkinID="field" runat="server" width="100%" />

MARKUP:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Compose.aspx.cs"
Inherits="Templates_Compose" EnableTheming="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<asp:Table ID="compose" runat="server">
<asp:TableRow>
<asp:TableCell SkinID="desc">Recipient</asp:TableCell>
<asp:TableCell SkinID="field">Recipient</asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:Content>


Jeff

Look at the generated html code, and you will see that the id of the
table tag that the Table control creates is not "compose".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top