CSS conflict

4 posts, 0 answers
  1. Kristian
    Kristian avatar
    6 posts
    Member since:
    Oct 2008

    Posted 20 Mar 2009 Link to this post

    Hi my problem is that I have a page with a Label that looks fine when i view the page, but when I open it in a RadWindow it doesnt look the same.
    I have narrowed it down to being a problem with the CSS.


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <style type="text/css">  
            font-family: Verdana, Geneva, sans-serif !important;  
            font-size: 16px !important;  
            font-style: normal !important;  
            font-weight: normal !important;  
            color: #365D9D !important;  
            text-decoration: none !important;  
            margin: 0px !important;  
            clip: rect(auto,auto,auto,auto) !important;  
            line-height: 35px !important;  
            padding-bottom: 15px !important;  
        <form id="form1" runat="server">  
            <asp:Label SkinID="TemplateSubHeader" ID="Label2" runat="server" Text="Name" ></asp:Label> 
            <class="TemplateSubHeader" style="font-family: Verdana, Geneva, sans-serif !important;font-size: 16px !important;font-style: normal !important;font-weight: normal !important;color: #365D9D !important;text-decoration: none !important;margin: 0px !important;clip: rect(auto,auto,auto,auto) !important;line-height: 35px !important;padding-bottom: 15px !important;">Name</p> 

    This is how I call it from another page in codebehind
    protected void Button1_Click(object sender, EventArgs e)  
            PopUp.NavigateUrl = test.aspx";  
            PopUp.Visible = true;  
            PopUp.Width = 800;  
            PopUp.Height = 600;  
            PopUp.Modal = false;  
            PopUp.Overlay = true;  
            PopUp.VisibleStatusbar = false;  
            PopUp.VisibleTitlebar = true;  
            PopUp.Title = "Opret galleri";  
            PopUp.Style.Add(HtmlTextWriterStyle.ZIndex, "1000");  
            PopUp.Animation = Telerik.Web.UI.WindowAnimation.Fade;  
            PopUp.VisibleOnPageLoad = true;  

    Try to view the test.asp in the browser and then view it from in the radwindow and you will notice that they a different

    VS 2008
    Telerik version 2008.3.1105.35
    IE 7

    Is there a fix or a workaround for solving this problem

    Thanks in advance
  2. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 22 Mar 2009 Link to this post

    Hi Kristian,

    Actually it looks exactly the same in a radwindow as in a regular browser window. The reason for the css class not being applied to the label in the code you posted is because you seem to be trying to reference the css class with the "SkinID" proterty rather than the "CssClass" property.

    So while this doesn't work:

    this does:

  3. DevCraft R3 2016 release webinar banner
  4. Kristian
    Kristian avatar
    6 posts
    Member since:
    Oct 2008

    Posted 22 Mar 2009 Link to this post

    Hi DJ

    Thanks for your reply.
    Im sorry that I forgot to mention that I have a skin file with the CssClass set for the specified skin.

    That is why I just below have put a <p> tag with inline style which also illustrates that there is a css conflict.

    Please try to create a test project and rename the skinID to CssClass and you will see that the problem still persists, :(

    The <p> and label will look identical and this is also the case when it is viewed in the telerik window.
    But they are both displayed wrongly in the telerik window.

    Best regards
  5. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 23 Mar 2009 Link to this post

    Hello Kristian,

    I tried your code but I am not able to see a difference. Could you please open a support ticket and send us a screenshot of what exactly is the problem? We will check it right away.

    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top