Click here to Skip to main content
15,885,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,


Am very new face for asp .net. Now i create one master page and content page. Content page displayed at contentplaceholder. But css is not apply for content page. Am try this one

At Master Page

</head>
XML
<link href="css/career.css" rel="stylesheet" type="text/css"/>

   <asp:ContentPlaceHolder id="head" runat="server">

   </asp:ContentPlaceHolder>


At Content Page

XML
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <link href="../css/career.css" rel="stylesheet" type="text/css" media="screen" runat="server"  />
<div id="whole">





All replies are welcome....


Thanks and Regards,

Dhineshkumar Velmayil.
Posted

What's Your Web Directory Structure? Please Provide a Screenshot of Your Project Explorer.
 
Share this answer
 
In master page you need to provide your css file link

ASP.NET
<head id="Head1" runat="server">
  <link href="Styles/MainPage.css" rel="stylesheet" type="text/css" />

<body>




Then you can easily use your css properties in aspx pages.
 
Share this answer
 
v2

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