Click here to Skip to main content
15,888,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have an ASPX page, displaying in a contentplaceholder.
The ASPX page has a materpage.
I found on the web that I can only invoke the Stylesheet through the masterpage.
it looks like this:
XML
<head runat="server">
    <title>MasterPage Page</title>
    <link href="~/Maintenance.css" rel="Stylesheet" type="text/css" />
</head>


This tells me there is an autamitic inherance of the stylesheet for the aspx page.

I added a format to the stylesheet:
CSS
table_PageHeader
{
    padding: 0,0,0,0;
    font-family: Tahoma;
    font-size: 10pt ;
    width:99%;
    background-color:Black ;
    text-align: center ;
    vertical-align: middle;
}


Then, I wish to apply it to a table row on the aspx page.
This I try to achieve by typing in the name "table_PageHeader" in the Class property of the selected table row.
Note, my expectation is that Class property should drop down the different elements in the style sheet as I have found in ASP.NET 2008, but not in 2005 sofar.

The format does not seem to take effect in either development or runtime mode.
Please help. What am I missing ?
Posted

1 solution

To specify a class in css, you need to prefix the name with a dot:

.table_PageHeader
{
  ...
}


Also, you can add a ContentPlaceHolder in the head section of your master page if you want to be able to add a stylesheet in a page.

Nick
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900