inline css in the html source file

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/4/2010 8:10:27 PM
Gravatar
Total Posts 14

inline css in the html source file

Hi all,

Here is inline css in the html file rendered. I am not sure where is coming from. Normally it does not bother me at all. but I do not know how it gets in and it overwrite some of my css settings. Can anyone tell? I would like to disable it, if I can.

Thanks!

 

...<link rel='shortcut icon' href='http://www.helengao.com/Data/Sites/1/skins/aa-helen-gao/favicon.ico' />
<link rel='canonical' href='http://www.helengao.com/home.aspx' /><style type="text/css">
/* <![CDATA[ */
#SiteMenu1_ctl00 img.icon { border-style:none;vertical-align:middle; }
#SiteMenu1_ctl00 img.separator { border-style:none;display:block; }
#SiteMenu1_ctl00 img.horizontal-separator { border-style:none;vertical-align:middle; }
#SiteMenu1_ctl00 ul { list-style:none;margin:0;padding:0;width:auto; }
#SiteMenu1_ctl00 ul.dynamic { z-index:1; }
#SiteMenu1_ctl00 a { text-decoration:none;white-space:nowrap;display:block; }
#SiteMenu1_ctl00 a.static { padding-left:0.15em;padding-right:0.15em; }
#SiteMenu1_ctl00 a.popout { background-image:url("/WebResource.axd?d=RtdWy8EvNykwUKo0S4SpjxPpaZr8c_VUr9LQENMUw7w1&t=634067682654867974");background-repeat:no-repeat;background-position:right center;padding-right:14px; }
/* ]]> */
</style></head>
 

11/4/2010 9:04:35 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: inline css in the html source file

Well, it's definitely happening in the <head> of your source. I checked out our site, and we don't have any inline styling like that when viewing source (also using an Artisteer skin), so I don't think it's coming out of mojoPortal. I would start by looking at your skin's layout.master file and see if it's embedded in there.

Inspecting your site with FireBug, I also see that your head has an ID of "Head1". Ours is "ctl01_Head1". I know mojoPortal uses at least some of those IDs, but I don't know if this particular one might be a problem.

I hope that helps out.

Jamie

11/5/2010 12:50:15 AM
Gravatar
Total Posts 14

Re: inline css in the html source file

Jamie, you may be right.

I did not happen to my dev machine that using the same skin and I searched the source code unsuccessfully for anything related to the issue.

However I did the following test:

1. updated the layout.master file and changed the header ID to header11. After reload the page, I see the Header11 as the ID.

2. I removed everything after the <portal:Favicon ID="Favicon1" runat="server" /> in the header, I got the same problem.

What I can conclude is that somehow in the code, it was added. Not sure how and why. It is one of those things should have easy answer.

 

Thanks!

 

dl

11/5/2010 7:51:17 AM
Gravatar
Total Posts 70

Re: inline css in the html source file

I'm pretty sure it is a difference between .NET 3.5 and .NET 4, it happens in 3.5 but it is added by the runtime not mojo and there is no easy way to get rid of it.

Steve

11/5/2010 9:43:15 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: inline css in the html source file

That could definitely explain it. We're running .NET 4.

11/5/2010 9:57:00 AM
Gravatar
Total Posts 2253

Re: inline css in the html source file

Hi,

Check out this post: http://www.mojoportal.com/Forums/Thread.aspx?pageid=5&mid=34&ItemID=4&thread=5904&postid=24297.

If you are running the .NET 4 web.config with the .NET 3.5 release files, this kind of thing can occur. I would make sure you are running the correct web.config with it's corresponding release files and update to the latest version of mojoPortal.

HTH,
Joe D.

11/5/2010 12:49:12 PM
Gravatar
Total Posts 14

Re: inline css in the html source file

Indeed. I was running dotnet 3.5 deployment file on 4.0 server. By switching to 4.0 deployment files, it fixed the issue.

 

Thanks for everyone's help!

 

dl

11/5/2010 1:41:38 PM
Gravatar
Total Posts 14

Re: inline css in the html source file

On the second thought, I was thinking this issue can be prevented by include one time check while asp.net app starts or it can be done at /setup/default.aspx.

However it whill have to integrate with the compile to release script.

 

dl

 

#if CompileVersion350
if (!RuntimeEnvironment.GetSystemVersion().StartsWith("v4."))
#else
if (RuntimeEnvironment.GetSystemVersion().StartsWith("v4."))
#endif
{

this.Response.Write("Wrong dotnet version");
this.Response.End();
}

 

11/8/2010 2:08:44 PM
Gravatar
Total Posts 18439

Re: inline css in the html source file

Hi,

We have code like this in the Administration > System Information page to show the framework version

Unfortunately it does not work in medium trust so it has to have a try catch around it and therefore isn't very suitable for the setup page.

Technically it is possible to run the 3.5 .NET version of mojoPortal under .NET 4, so it is not an error to do so, just not a recommended approach since we have packages optimized for .NET 4. So I don't think we need to say "Wrong dotnet version" in this case.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.