css文件在我的aspx文件中不起作用 [英] css file not working in my aspx file
本文介绍了css文件在我的aspx文件中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨朋友以下是我的aspx文件代码。
Hi friends The following is my code for aspx file.
<head runat="server">
<title></title>
<link rel="Stylesheet" href="~/css/Pagedesigncss.css" type="text/css" runat="server"/>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="style1" width="100%" border="0" style="font-weight:bold;" cellpadding="0" cellspacing="0" bgcolor="#8093a8">
<tr>
<td colspan="2" width="25%" height="50" align="left" valign="middle" bgcolor="#25578b">
Message Template Details</td>
</tr>
<tr>
<td >Template Id
</td>
<td>
<asp:TextBox ID="nametxt" runat="server" CssClass="roundedbox"
Height="20px" Width="245px"></asp:TextBox></td>
</tr>
<tr>
<td >Template For
</td>
<td>
<asp:DropDownList
ID="DropDownList2" runat="server" CssClass="roundedbox">
</asp:DropDownList>
</td>
</tr>
<tr>
<td >Template
</td>
<td>
<asp:TextBox ID="TextBox4" runat="server" CssClass="roundedbox" Width="375px"></asp:TextBox>
</td>
</tr>
</table>
</div>
</form>
</body>
和我的css文件是
and my css file is
.roundedbox {
background:#fff;
font-family:Verdana,Arial, Helvetica, sans-serif;
font-size:10pt;
margin-left:auto;
margin-right:auto;
margin-top:1px;
margin-bottom:1px;
padding:3px;
border-top:1px solid #CCCCCC;
border-left:1px solid #CCCCCC;
border-right:1px solid #999999;
border-bottom:1px solid #999999;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
}
但它不适用于我的页面。请帮助我预感谢所有
but it does not applied in my page. please help me Advance thanks to all
推荐答案
尝试更改你的href值以匹配下面的那个...
Try changing your href value to match the one below...
<link rel="Stylesheet" href="../css/Pagedesigncss.css" type="text/css" runat="server" />
...注意你有波浪号字符的两个点。
... note the two dots where you had the tilde character.
这篇关于css文件在我的aspx文件中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文