无法在显示在contentplaceholder中的ASPX页面中调用样式表 [英] Cannot invoke stylesheet in ASPX pages displaying in contentplaceholder
问题描述
嗨.
我有一个ASPX页面,显示在contentplaceholder中.
ASPX页面有一个母版页.
我在网上发现只能通过母版页调用样式表.
看起来像这样:
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:
<head runat="server">
<title>MasterPage Page</title>
<link href="~/Maintenance.css" rel="Stylesheet" type="text/css" />
</head>
这告诉我,aspx页面的样式表有一个自定义的继承.
我在样式表中添加了一种格式:
This tells me there is an autamitic inherance of the stylesheet for the aspx page.
I added a format to the stylesheet:
table_PageHeader
{
padding: 0,0,0,0;
font-family: Tahoma;
font-size: 10pt ;
width:99%;
background-color:Black ;
text-align: center ;
vertical-align: middle;
}
然后,我希望将其应用于aspx页上的表格行.
我尝试通过在所选表行的Class属性中键入名称"table_PageHeader" 来实现.
请注意,我的期望是Class属性应该下拉样式表中的不同元素,就像我在ASP.NET 2008中发现的那样,而在2005 sofar中发现的那样.
该格式似乎在开发或运行时模式下均无效.
请帮忙.我缺少了什么?
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 ?
推荐答案
您需要添加一个点,如:
You need to add a dot as:
.table_PageHeader {
...
}
和合数码人
点是什么? .....显然很多!!!
谢谢
he-he Digital Man
What''s in a dot ? .....obviously a lot !!!
Thanks
这篇关于无法在显示在contentplaceholder中的ASPX页面中调用样式表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!