Click here to Skip to main content
15,885,876 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
Praveen Kumar Upadhyay 23-Dec-14 6:59am    
Are you using Inline CSS, Extended Css or External Css?
I suppose if using Inline Css then that will be only application to the page means will not apply to the child pages.
Adekolurejo 23-Dec-14 15:53pm    
Hi Praveen and thanks for your response. I have got css file created in web developer in a style folder and i link it to the master page which is working on master page but just cant get it to work on other aspx pages. I just want to style my page with css.
Regards,

Ade.
Praveen Kumar Upadhyay 23-Dec-14 21:42pm    
Is your master page and child page are in same directory??
Adekolurejo 24-Dec-14 18:18pm    
Yes but I have got my css file in a folder called Style. Still cant align Labels and and textboxes in my forms which is in a child pages. All pages inherit from the master page.
Praveen Kumar Upadhyay 25-Dec-14 9:05am    
Please show code of Master page and child page declaration

1 solution

hi Master page code.

XML
<%@ 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>
 
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