css适用于母版页,但无法应用于使用母版页的页面 [英] css works on master page but unable to apply to the pages that uses the mater page
问题描述
请帮帮我。
我有一个使用Visual Web Developer 2010开发的母版页,我在这个母版页中配置了页面布局以便拥有相同的页面布局页面上的外观和感觉。
现在,我创建了一个用户注册表单,它将接受用户注册的详细信息并提交给数据库。所有控件都在注册表单中的DIV标签中,我在创建from时选择母版页。
我现在面临的问题是我如何设计这个使用CSS注册表格?我尽我所能,但没有任何工作。 CSS已经附加到母版页并且在母版页上工作,但在创建的任何其他页面中都没有。我以前从未这样做过,但我确信这个问题有解决方案。例如,我希望使用css在右侧显示All the Labels Float:Left和TextBoxes。如果我把它应用到没有母版页的页面,css就可以工作。
请你帮忙解决这个问题将不胜感激。
谢谢大家
Please Help me out.
I have a master page developed using Visual Web Developer 2010 and I have configure page layout in this master page in order to have same look and feel across the pages.
Now, I create a user Registration form that will accept details of registration from the user and submit to database. All the controls are in a DIV tag inside Registration form and I select the master page while creating the from.
The problem I am facing now is how do I style this Registration form using CSS? I have tried all I could but nothing is working. The CSS is already attached to the master page and working on master page but not in any other pages created. I have never done it before but am sure there is solution to this issue. For example, I want All the Labels Float:Left and TextBoxes on the right using css. The css works if I apply it to a page with no master page.
Please you help to resolve this issue will be much appreciated.
Thank you all
推荐答案
hi主页面代码。
hi Master page code.
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Money Tranfer</title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<link href="Styles/StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="wrapper">
<div id="banner">
<asp:Image ID="Image1" runat="server" Height="30%"
ImageUrl="~/Images/forex.jpg" Width="100%" />
</div>
<div id="navigation">
<ul id="nav">
<li>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Pages/Home.aspx">Home</asp:HyperLink></li>
<li>
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Pages/About.aspx">About us</asp:HyperLink></li>
<li>
<asp:HyperLink ID="HyperLink3" runat="server">Services</asp:HyperLink></li>
<li>
<asp:HyperLink ID="HyperLink4" runat="server">Our Rate</asp:HyperLink></li>
<li>
<asp:HyperLink ID="HyperLink5" runat="server">Contact Us</asp:HyperLink></li>
<li>
<asp:HyperLink ID="HyperLink6" runat="server">Customer Login</asp:HyperLink></li>
</ul>
</div>
<div id="content">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</div>
</form>
</body>
</html>
这篇关于css适用于母版页,但无法应用于使用母版页的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!