Changes in css file do not apply to the page
-
There is some Default.css file I linked to my web project. The styles are applied normally and look as they should, but when I add new style to css file or change existing one (.button-css), they only take place in design view, but not when the page is being run. However the styles defined in head section (.button-local) are applied as they should during design and run time.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GenderAge._Default" %>
Default page .button-local { height:24px; margin:0px; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; font-size:15px; font-family:Verdana, Arial, Helvetica, sans-serif; color:#FF00FF; } <div>normal button </div> <div>wierd button </div>
Чесноков
-
There is some Default.css file I linked to my web project. The styles are applied normally and look as they should, but when I add new style to css file or change existing one (.button-css), they only take place in design view, but not when the page is being run. However the styles defined in head section (.button-local) are applied as they should during design and run time.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GenderAge._Default" %>
Default page .button-local { height:24px; margin:0px; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; font-size:15px; font-family:Verdana, Arial, Helvetica, sans-serif; color:#FF00FF; } <div>normal button </div> <div>wierd button </div>
Чесноков
Did you check the page by adding .button-local to your Default.css?
Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.
-
Did you check the page by adding .button-local to your Default.css?
Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.
Yes. The problem turned out to be that the changes are applied and the result is seen in VS design view and if the project gets published and you open the page in IE. But the styles become lost when you run the page from VS.
Чесноков
-
Yes. The problem turned out to be that the changes are applied and the result is seen in VS design view and if the project gets published and you open the page in IE. But the styles become lost when you run the page from VS.
Чесноков
I think it's something related to theme. If you have both theme and CSS then theme wins. Anyway, try two things - 1. Remove the CSS file entry from you ASPX form. Then check if it works or not. 2. Next remove your css file from Theme folder to any other 'css' folder. Then check if it's being applied. Obviously, it would have been better if you work with Theme and skin[^]. Checkout if this helps you at all.:)
Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.
-
I think it's something related to theme. If you have both theme and CSS then theme wins. Anyway, try two things - 1. Remove the CSS file entry from you ASPX form. Then check if it works or not. 2. Next remove your css file from Theme folder to any other 'css' folder. Then check if it's being applied. Obviously, it would have been better if you work with Theme and skin[^]. Checkout if this helps you at all.:)
Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.
Removing the CSS works. I tried themes instead also.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WierdCss._Default" StylesheetTheme="Default" EnableTheming="True" %>
e.g. in css file I created body class. it works in design view and VS2008 debugging. but after I add next class entry, it works in design view, but no longer in VS2008 ASP.NET dev server??? I remove the css file, and theme. I attach it again, all the same. It seems it catches the snapshot of the css file once it was attached. And next any changes to it or additions of classes are no longer displayed in ASP.NET dev server. :doh:
Чесноков
-
I think it's something related to theme. If you have both theme and CSS then theme wins. Anyway, try two things - 1. Remove the CSS file entry from you ASPX form. Then check if it works or not. 2. Next remove your css file from Theme folder to any other 'css' folder. Then check if it's being applied. Obviously, it would have been better if you work with Theme and skin[^]. Checkout if this helps you at all.:)
Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.
I need to provide CSS rules for html elements e.g. body and for ASP.NET controls. Can I do it using themes only? It needs CSS to be created and attached also
Чесноков
-
There is some Default.css file I linked to my web project. The styles are applied normally and look as they should, but when I add new style to css file or change existing one (.button-css), they only take place in design view, but not when the page is being run. However the styles defined in head section (.button-local) are applied as they should during design and run time.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GenderAge._Default" %>
Default page .button-local { height:24px; margin:0px; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; font-size:15px; font-family:Verdana, Arial, Helvetica, sans-serif; color:#FF00FF; } <div>normal button </div> <div>wierd button </div>
Чесноков
-
http://download.microsoft.com/download/c/7/a/c7a07f0e-4778-4d73-a163-f873a06b18ed/rounded06.msi[^] I add the css and its Images into the App_Theme\Blue theme. I enable themes and set for content page of the master the Blue theme. I attach the css in the <head> of the master. All works great, until at some step during the page developing and asp controls additions, changes in css and styles asignments to asp controls stop to be displayed in ASP.NET development server. Only the publiched version works.
Чесноков
-
There is some Default.css file I linked to my web project. The styles are applied normally and look as they should, but when I add new style to css file or change existing one (.button-css), they only take place in design view, but not when the page is being run. However the styles defined in head section (.button-local) are applied as they should during design and run time.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GenderAge._Default" %>
Default page .button-local { height:24px; margin:0px; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; font-size:15px; font-family:Verdana, Arial, Helvetica, sans-serif; color:#FF00FF; } <div>normal button </div> <div>wierd button </div>
Чесноков
They are Some Cases When The Browser store the cookies and the if u add the new styles also, the browser will show the old files .First Delete the cookies and the storage info in the browser I think U know How to delete the cookies privacy data and all .And now check . If this Is not Your Answer Sorry..!If this is Your Answer Let Me know
-
They are Some Cases When The Browser store the cookies and the if u add the new styles also, the browser will show the old files .First Delete the cookies and the storage info in the browser I think U know How to delete the cookies privacy data and all .And now check . If this Is not Your Answer Sorry..!If this is Your Answer Let Me know
Yes, that helped. I deleted them from IE after I launched the ASP.NET server and refreshed the page. Great, you saved my troubles!!! :thumbsup: I starting digging deeper e.g. http://www.codeproject.com/Messages/3178921/Re-CSS-styles-cease-to-be-visible-in-ASP-NET-devel.aspx[^] It helped after I added 2 href CSS links to master, the blue and red for 2 themes. Blue css started to work, but only if red link is also present. :omg: and that is my case also: http://forums.asp.net/t/1385824.aspx[^] but their solution does not help
Чесноков
-
Yes, that helped. I deleted them from IE after I launched the ASP.NET server and refreshed the page. Great, you saved my troubles!!! :thumbsup: I starting digging deeper e.g. http://www.codeproject.com/Messages/3178921/Re-CSS-styles-cease-to-be-visible-in-ASP-NET-devel.aspx[^] It helped after I added 2 href CSS links to master, the blue and red for 2 themes. Blue css started to work, but only if red link is also present. :omg: and that is my case also: http://forums.asp.net/t/1385824.aspx[^] but their solution does not help
Чесноков