css with asp .net themes

  • Thread starter Thread starter Sems
  • Start date Start date
S

Sems

Hi

I am using asp .net themes in my application and have a problem with
the ordering of the css styles.

I have a ie7 syle that must appear last in the masterpages head
section however the css styles pulled in my the theme are inserted as
the last part of the head section. This means that those styles over
write the ie7 style sheet.

Has anyone dealt with this before?

Thanks
 
Hi

I am using asp .net themes in my application and have a problem with
the ordering of the css styles.

I have a ie7 syle that must appear last in the masterpages head
section however the css styles pulled in my the theme are inserted as
the last part of the head section. This means that those styles over
write the ie7 style sheet.

Has anyone dealt with this before?

Thanks

I think you cannot solve it using themes, and you can try to embed CSS
condition in your master page

<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="/ie7.css" />
<![endif]-->
 
I am using asp .net themes in my application and have a problem with
the ordering of the css styles.
I have a ie7 syle that must appear last in the masterpages head
section however the css styles pulled in my the theme are inserted as
the last part of the head section. This means that those styles over
write the ie7 style sheet.
Has anyone dealt with this before?

I think you cannot solve it using themes, and you can try to embed CSS
condition in your master page

<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="/ie7.css" />
<![endif]-->

Hi,

Thanks for your response.

I am bringing in the IE7 style sheet like that, the issue is that when
the theme pulls in its style sheets they appear in the head section
after the IE7 sheet. This means that the IE7 styles are overridden.
 
I think you cannot solve it using themes, and you can try to embed CSS
condition in your master page
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="/ie7.css" />
<![endif]-->

Hi,

Thanks for your response.

I am bringing in the IE7 style sheet like that, the issue is that when
the theme pulls in its style sheets they appear in the head section
after the IE7 sheet. This means that the IE7 styles are overridden.

ok, I see what you mean. You can solve it in the following way.
Instead of writing the style in the master page, do it
programmatically from the code behind. Put following lines in the
Page_Load event of your master page

Page.Header.Controls.Add(new LiteralControl(@"
<!--[if IE 7]>
<link rel=""stylesheet"" type=""text/css"" href=""/ie7.css"" />
<![endif]-->"
));

This should add your style after the theme's css like expected.

Hope this helps
 
Hi
I am using asp .net themes in my application and have a problem with
the ordering of the css styles.
I have a ie7 syle that must appear last in the masterpages head
section however the css styles pulled in my the theme are inserted as
the last part of the head section. This means that those styles over
write the ie7 style sheet.
Has anyone dealt with this before?
Thanks
I think you cannot solve it using themes, and you can try to embed CSS
condition in your master page
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="/ie7.css" />
<![endif]-->

Thanks for your response.
I am bringing in the IE7 style sheet like that, the issue is that when
the theme pulls in its style sheets they appear in the head section
after the IE7 sheet. This means that the IE7 styles are overridden.

ok, I see what you mean. You can solve it in the following way.
Instead of writing the style in the master page, do it
programmatically from the code behind. Put following lines in the
Page_Load event of your master page

Page.Header.Controls.Add(new LiteralControl(@"
<!--[if IE 7]>
<link rel=""stylesheet"" type=""text/css"" href=""/ie7.css"" />
<![endif]-->"
));

This should add your style after the theme's css like expected.

Hope this helps- Hide quoted text -

- Show quoted text -

Great thats what I was looking for. Thanks
 
Back
Top