Drupal, Tutorials

I have a browser problem with my internet explorer in drupal7 theme ?

You can choose which will work in the strategies here from the list below:

List of strategies

1. add two the line to settings.php, to sure not released with compression
$conf[‘css_gzip_compression’] = FALSE;
$conf[‘js_gzip_compression’] = FALSE;

 

2. enable the ( Aggregate and compress CSS files.) in the configuration performances

3. I have a browser problem with my internet explorer in drupal7 theming ?

4.

<link type=”text/css” rel=”stylesheet” href=”http://www.medsuma.de/” media=”all” />
<link type=”text/css” rel=”stylesheet” href=”http://www.medsuma.de/” media=”all” />
<link type=”text/css” rel=”stylesheet” href=”http://www.medsuma.de/” media=”all” />
<link type=”text/css” rel=”stylesheet” href=”http://www.medsuma.de/” media=”print” />

 

5.  .htaccess, this part append gzip header

<FilesMatch “(\.js\.gz|\.css\.gz)$”>
# Serve correct encoding type.
Header append Content-Encoding gzip
# Force proxies to cache gzipped & non-gzipped css/js files separately.
Header append Vary Accept-Encoding
</FilesMatch>

6. Adding a theme something looks like this

function yourtheme_preprocess_html(&$variables) {
  // Add conditional stylesheets for IE
  drupal_add_css(path_to_theme() . '/css/ie8style.css', array(
    'group' => CSS_THEME,
    'browsers' => array(
      'IE' => 'lte IE 8',
      '!IE' => FALSE,
     ),
    'every_page' => TRUE,
    'weight' => 10,
   )
  );
} 

7.

You can do this in your template.php file with a preprocess_html theme hook and drupal_add_cssfunction. You will find example in drupal 7 theme, for example in bartik :

// Add conditional stylesheets for IE
drupal_add_css(path_to_theme() . '/css/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
drupal_add_css(path_to_theme() . '/css/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 6', '!IE' => FALSE), 'preprocess' => FALSE));

8. 
Internet Explorer implements a proprietary technology called Conditional Comments. While web developers frown upon technologies that aren't cross-browser supported, 
many CSS developers have found Conditional Comments very useful. They can have cleaner CSS in their normal stylesheets and can fix the broken rendering in IE by placing IE-only CSS 
inside conditional comments; this technique is even recommended by Microsoft. Without this module, the only way to have IE conditional stylesheets was to add 37 lines of code
 (more if you want to add more than one stylesheet) in four horribly-difficult-to-remember function calls to your theme's template.php. Blech. Who wants that?

9.I've also added the following to my template.php file to remove certain Drupal CSS files as 
# get array of stylesheets
$css = drupal_add_css();
unset($css['all']['module']['modules/system/system.css']);
unset($css['all']['module']['modules/system/defaults.css']);
unset($css['print']['theme']['themes/mytheme/print.css']);
10. 

Add this to your clinigen.info file:

stylesheets-conditional[lte IE 7][all][] = _css/ie7.css

And remove this from main.css:

@import url("ie7.css");

11.

As we all know, there are two ways to load a stylesheet on your web page. You can use a <link /> tag or an @import inside a <style> tag.

<link rel="stylesheet" href="style1.css" type="text/css" media="all" />
<style type="text/css" title="text/css" media="all">
@import url(style2.css);
</style>
 
12.
Drupal-based Solutions

Fortunately, my CMS/framework of choice is Drupal and it has a built-in solution. If you enable the “Optimize CSS files” 
option on admin/settings/performance,  Drupal will aggregate all of your site’s stylesheets into one file. This will keep you well below IE’s limits. And, as a bonus,
 it will decrease server load and improve user-experienced performance of your site since the browser will have far fewer server connections to make in order to get your styles. 
Yay! But this option isn’t enabled by default (something we are currently working on fixing in Drupal 7), so make sure you go enable it on your production servers now!

13.
 I installed the Unlimited_CSS module and thought it would help solve the problem but it does not. What should I do to get my site appear in IE the way it does in Firefox?

14.
I solved my own problem ... turns out that the "Aggregate Css files" feature was causing the problem with that particular host. I turned it off,
cleared the cache and everything started working fine in Internet Explorer.

15.
f your CSS breaks when aggregation is turned on, it probably means you have an error in your CSS somewhere, 
that is breaking all CSS that comes after it. Validate your CSS at W3C to try to find the error.

 

Add your comments

Loading Facebook Comments ...
Loading Disqus Comments ...