the layout and formatiing of content page 1 is ok. but when i load content page 2, formatting is not applied. can someone sort this for me please. thank you in advance
Wow even when i remove the css file formatting is still applied to the masterpage and contentpage 1. can some help me please. am getting desperate. out of solutions and tricks. thnak you
i renamed the CSS file, then all formatting on the master and content page were gone.
then i change the link for the CSS on the pages. then i applied formatting bit by bit until formatting is not being applied. why am getting this problem.
Marked as answer by darksyfer on May 02, 2012 03:19 PM
i renamed the CSS file, then all formatting on the master and content page were gone.
css and javascript files are cached in browser for future use... when u make any changes in css, you should clear browser cache and refresh the page to see the changes... otherwise, browser will pick old css file from cache and you wont get the changes
hope this helps...
Cheers!
KK
Please mark as Answer if post helps in resolving your issue
My Site
Marked as answer by darksyfer on May 02, 2012 03:19 PM
darksyfer
Member
17 Points
37 Posts
Issue with CSS in masterpage and contentpage
May 02, 2012 02:25 PM|LINK
i have a masterpage with the following code
<head runat="server"> <link href = "../../Styles/Administrator.css" rel = "Stylesheet" type = "text/css" /> <script src ="../../Scripts/JScript.js" type="text/javascript"></script> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder> </head> <asp:ContentPlaceHolder ID="cphForAdminMenuExtensions" runat="server"> </asp:ContentPlaceHolder>i have 2 contentpages. and there code are as follows
content page 1
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Account/Administrator/Administrator.Master" CodeBehind="BookList.aspx.vb" Inherits="UTM_Online_Library.BookList" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="cphForAdminMenuExtensions" runat="server"> <div class = "dvSearch"> <asp:TextBox ID = "txtSearch" runat = "server" BackColor = "White" Height = "25" Width = "450" Font-Size = "Medium" BorderColor = "silver" BorderStyle = "solid" style = "border-width:thin" onFocus = "this.style.borderColor='blue'" OnBlur="this.style.borderColor='black'"/> <asp:Button ID = "btnSearch" runat = "server" Text = "Search" Height = "30" /> </div> <div class = "dvGrid"> </div> </asp:Content>content page 2
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Account/Administrator/Administrator.Master" CodeBehind="AddBook.aspx.vb" Inherits="UTM_Online_Library.AddBook" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="cphForAdminMenuExtensions" runat="server"> <div class = "dvContent"> <table class = "tblContent" border = "0"> </table> </div> </asp:Content>my CSS
.dvSearch { position:absolute; top:30px; left:155px; } .dvGrid { position:absolute; top:62px; left:155px; } .dvContent { position:absolute; top:80px; left:155px; }the layout and formatiing of content page 1 is ok. but when i load content page 2, formatting is not applied. can someone sort this for me please. thank you in advance
kedarrkulkar...
All-Star
34229 Points
5496 Posts
Re: Issue with CSS in masterpage and contentpage
May 02, 2012 02:33 PM|LINK
it might be that you are not able to see the formatting applied to div divContent in content page2
try adding some text or control inside div... like this and see if it works
<div class = "dvContent">
some text
<table class = "tblContent" border = "0">
</table>
</div>
hope this helps...
KK
Please mark as Answer if post helps in resolving your issue
My Site
darksyfer
Member
17 Points
37 Posts
Re: Issue with CSS in masterpage and contentpage
May 02, 2012 02:39 PM|LINK
i got a table inside the div but stil i cant position the div nor apply formatting. any other solutions please
darksyfer
Member
17 Points
37 Posts
Re: Issue with CSS in masterpage and contentpage
May 02, 2012 02:49 PM|LINK
Wow even when i remove the css file formatting is still applied to the masterpage and contentpage 1. can some help me please. am getting desperate. out of solutions and tricks. thnak you
darksyfer
Member
17 Points
37 Posts
Re: Issue with CSS in masterpage and contentpage
May 02, 2012 03:01 PM|LINK
i renamed the CSS file, then all formatting on the master and content page were gone.
then i change the link for the CSS on the pages. then i applied formatting bit by bit until formatting is not being applied. why am getting this problem.
kedarrkulkar...
All-Star
34229 Points
5496 Posts
Re: Issue with CSS in masterpage and contentpage
May 02, 2012 03:10 PM|LINK
css and javascript files are cached in browser for future use... when u make any changes in css, you should clear browser cache and refresh the page to see the changes... otherwise, browser will pick old css file from cache and you wont get the changes
hope this helps...
KK
Please mark as Answer if post helps in resolving your issue
My Site