CSS Stile problem with IE7 (links color)

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
7/23/2009 6:26:06 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

CSS Stile problem with IE7 (links color)

Sys op: Server: Win 2003
Database: MS SQL 2005
mojoPortal: 2-3-1-0
Browsers: IE7

Hi Joe,

I know about the peculiar behaviour of IE7 with CSS.
And actually I am not sure this is a bug, but I'd like to share this experience and get some advising.

I have copied an existing skin to do some customization.
One of the custom setting is the hypertext links color.

I have then tested the new skin on several clients/browsers (IE8, chrome, firefox) with no problems.

With IE7, links style colors do not work as expected.

Most links are reset to browser default (blue and magenta for visited) others (i.e. treeview) are set to the :hover color regardless of the mouse position.

This happens only with IE7 and <add key="CacheCssOnServer" value="true" />.

With <add key="CacheCssOnServer" value="false" /> IE7 works like all the other browsers.

I probably have done some mistakes in the CSS codification but to catch the error I need to understand better how the CacheCssOnServer setting applies to the skins (including IE7specific.css) and why, when is set to false, IE7 works fine.

Would you help me ?

Regards.
Diego

7/23/2009 7:48:10 AM
Gravatar
Total Posts 18439

Re: CSS Stile problem with IE7 (links color)

Hi Diego,

You can override styles in IE 7 using the IE7Specific.css file. Note that this file is not to be inlcuded in the list in the style.config file, it must live in the skin folder and it is not subject to the same css combining/minimizing/caching as the main css. The IE specific files are added into the page using IE comments  so they are extra css files specific to IE but are ignored by other browsers. They are addeed to the page below the main CSS like this:

<!--[if lt IE 7]>
<link rel="stylesheet" href="http://www.mojoportal.com/Data/Sites/1/skins/mojosite-brightside3/IESpecific.css" type="text/css" id="IECSS" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="http://www.mojoportal.com/Data/Sites/1/skins/mojosite-brightside3/IE7Specific.css" type="text/css" id="IE7CSS" />
<![endif]-->

so IESpecific.css is for IE6 and IE7Speciofic.css is for IE 7.

Its possible there is already something in the IE7Specific.css that is causing the lionks to not be styled correctly or you can possibly fix it using this file.

Hope it helps,

Joe

7/23/2009 8:24:00 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: CSS Stile problem with IE7 (links color)

Thank you,
This surely helps. I will check in deeper detail the skin files and eventually I will add some specific settings for IE7.

Still, I can't understand why the problem appears when I set <add key="CacheCssOnServer" value="true" /> in web.config and does not when i set <add key="CacheCssOnServer" value="false" />.

As a further test I have migrated the site and its database to the customer's server and the problem appears there as well, but regardless of the CacheCssOnServer settings.

Then, on my development server (where several skin settings were used before the final approval) I have updated web.config to clear the cache , I restarted the IIS and I cleared the browser cache.

I still get these two different behaviours with CacheCssOnServer = true|false.

7/23/2009 8:34:08 AM
Gravatar
Total Posts 18439

Re: CSS Stile problem with IE7 (links color)

Can't say that I understand how that is happening either but probably browser caching has some influence too.

One trick I've been doing lately is when I make some changes to a skin, I rename it like skinname_v2, doing this forces the changes to affect all users because since the path changed the css already in the browser cache is not used and it must request the new files because of the new skin path.

Best,

Joe 

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