CombineCSS trashes layout

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
9/26/2011 2:30:01 PM
Gravatar
Total Posts 6

CombineCSS trashes layout

I have an issue with CSS. When I turn the combiner on, it trashes the layout in both FF and IE.

I have fixed all the quoting issues in the CSS.

Without the combiner, many of the CSS rules do not render in IE.

 

9/27/2011 7:17:35 AM
Gravatar
Total Posts 18439

Re: CombineCSS trashes layout

The way to trouble shoot it is to view the css. I would enable combining but disable minifying so that the css is easier to read and look for anything malformed or incorrect, possibly you missed something in fixing the quoting. View the source of the page and then click the link for the  css handler to view the css,look for anything unexpected or incorrect.

Keep in mind that you can only control caching when using the combiner, if they are not combined then the browser may cache the static css files and changes may not appear until the browser cache is cleared. To clear the browser cache you need to not have the site open because it won't clear the cache for a page you are currently viewing. so go to google or something, clear the cache then come back to the site.

Hope that helps,

Joe

9/27/2011 2:07:42 PM
Gravatar
Total Posts 6

Re: CombineCSS trashes layout

I had already begun this process when I was instructed to post a question here.

I did find and fix a couple of badly formed selectors and extraneous comment closing tags in the css, which seemed to fix the primary issue, but now we have run into anther issue.

The 31 file limit on IE is forcing us to use the combiner, and it works, except for now, we are running into the 4095 selector per style sheet limit in IE.

After an exhausting search, the only solution I could find is to split the CSS files so that each has less than 4095 selectors.

We are toying with the idea of modifying the CSShandler to render the combined CSS as multiple "files", keeping each one below the 4095 selector per sheet limit.

Would like to know your thoughts, warnings, and advice on this approach and ask if you had any other method for defeating this IE limitation.

9/27/2011 2:20:38 PM
Gravatar
Total Posts 18439

Re: CombineCSS trashes layout

My advice is reduce the number of selectors and the number of files. Surely you don't really need that many selectors. If you have a lot of IE specific stuff you can move that into  IE specific css files as documented here. The IE specific files are loaded separately using IE Conditional comments so that stuff is not loaded in other browsers. Combine some of the files to reduce the number of them.

Hope that helps,

Joe

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