Linking ASP.NET web controls with CSS styles [modified]
-
There is a external css file with some classes and elements provided. I link it in the master page head section as from MSDN web sites templates:
After I set in some button controls CssStyle to some of the css classes, in VS design view the style is changed but when the page is run, they are displayed without any styles applied. How to link that stylesheet properly? or what is the problem
Чесноков
modified on Friday, August 28, 2009 8:42 AM
-
There is a external css file with some classes and elements provided. I link it in the master page head section as from MSDN web sites templates:
After I set in some button controls CssStyle to some of the css classes, in VS design view the style is changed but when the page is run, they are displayed without any styles applied. How to link that stylesheet properly? or what is the problem
Чесноков
modified on Friday, August 28, 2009 8:42 AM
Style sheet design cant be seen in your design page . It will be applied only when the page gets executed. I don't know how to have seen the design of style sheet in your design view. Nothing wrong in your registration with the master page. Post more codes to get clarification.
-
Style sheet design cant be seen in your design page . It will be applied only when the page gets executed. I don't know how to have seen the design of style sheet in your design view. Nothing wrong in your registration with the master page. Post more codes to get clarification.
In VS2008 there is addition of design view of your web page as it looks from the source, along with split, where you can watch both source code and the page look.
"Project.Master file"
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="GenderAge.master.cs" Inherits="GenderAge.GenderAge" %>
"Page.aspx file"
<%@ Page Title="" Language="C#" MasterPageFile="~/Project.Master" AutoEventWireup="true" CodeBehind="Page.aspx.cs" Inherits="Page.Main" %>
Чесноков
-
In VS2008 there is addition of design view of your web page as it looks from the source, along with split, where you can watch both source code and the page look.
"Project.Master file"
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="GenderAge.master.cs" Inherits="GenderAge.GenderAge" %>
"Page.aspx file"
<%@ Page Title="" Language="C#" MasterPageFile="~/Project.Master" AutoEventWireup="true" CodeBehind="Page.aspx.cs" Inherits="Page.Main" %>
Чесноков
What does the output HTML look like? What are you putting in the head place holder? Is the / missing from the end of due to a cut and paste issue or is it missing from your page as well?
-
What does the output HTML look like? What are you putting in the head place holder? Is the / missing from the end of due to a cut and paste issue or is it missing from your page as well?
yes, it misses in the paste operation here. I do not put anything in the head place holder Content1. Should I? After I created the App_Themes folder and put there css file the styles become visible after the page is started. However there is difference between VS2008 design view and the actual page, e.g. marging and padding does not work in some div controls???
Чесноков