This is a migrated thread and some comments may be shown as answers.

CSS conflict

3 Answers 167 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kristian
Top achievements
Rank 1
Kristian asked on 20 Mar 2009, 09:43 AM

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.

test.aspx 

<!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">  
    <title></title>  
    <style type="text/css">  
    .TemplateSubHeader   
    {  
        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;  
    }  
    </style> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <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> 
    </div> 
    </form> 
</body> 
</html> 

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

Enviroment:
VS 2008
Telerik version 2008.3.1105.35
IE 7

Is there a fix or a workaround for solving this problem

Thanks in advance
Kristian

3 Answers, 1 is accepted

Sort by
0
-DJ-
Top achievements
Rank 1
answered on 22 Mar 2009, 04:15 PM
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:
SkinID="TemplateSubHeader"

this does:
CssClass="TemplateSubHeader"

Regards,
-DJ-
0
Kristian
Top achievements
Rank 1
answered on 22 Mar 2009, 08:46 PM
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
Kristian
0
Georgi Tunev
Telerik team
answered on 23 Mar 2009, 12:49 PM
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.


Regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Kristian
Top achievements
Rank 1
Answers by
-DJ-
Top achievements
Rank 1
Kristian
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or