PC Review


Reply
Thread Tools Rate Thread

css with asp .net themes

 
 
Sems
Guest
Posts: n/a
 
      24th May 2010
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
 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      25th May 2010
On May 24, 2:07*pm, Sems <ben_camero...@hotmail.com> wrote:
> 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]-->
 
Reply With Quote
 
Sems
Guest
Posts: n/a
 
      26th May 2010
On 25 May, 09:25, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
> On May 24, 2:07*pm, Sems <ben_camero...@hotmail.com> wrote:
>
> > 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]-->


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.
 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      26th May 2010
On May 26, 10:16*am, Sems <ben_camero...@hotmail.com> wrote:
> On 25 May, 09:25, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
>
>
>
>
>
> > On May 24, 2:07*pm, Sems <ben_camero...@hotmail.com> wrote:

>
> > > 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]-->

>
> 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
 
Reply With Quote
 
Sems
Guest
Posts: n/a
 
      27th May 2010
On 26 May, 10:25, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
> On May 26, 10:16*am, Sems <ben_camero...@hotmail.com> wrote:
>
>
>
>
>
> > On 25 May, 09:25, Alexey Smirnov <alexey.smir...@gmail.com> wrote:

>
> > > On May 24, 2:07*pm, Sems <ben_camero...@hotmail.com> wrote:

>
> > > > 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]-->

>
> > 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- Hide quoted text -
>
> - Show quoted text -


Great thats what I was looking for. Thanks
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I convert Powerpoint themes to Word Themes? Rex E. White Microsoft Word Document Management 1 17th Aug 2009 10:52 AM
downloaded powerpoint themes disappear from custom themes Joan MAHCP Microsoft Powerpoint 3 2nd Mar 2009 11:02 PM
FP Themes Jenny Hamilton Microsoft Frontpage 6 8th Dec 2005 11:31 PM
Windows 98 themes ported over to 2K / XP ( ME may already have these themes ) *ProteanThread* Freeware 0 19th Jun 2004 02:23 AM
Themes John L Windows XP Customization 1 17th Jan 2004 07:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:04 AM.