By talyia on
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php print $head_title ?></title>
<link rel="stylesheet" href="style.css" type="text/css" />
<!--[if IE]>
<style>
#section_node #mainContent_02 {
overflow:scroll;
}
</style>
<![endif]-->
<?php
// write this css rule if we're on an admin page (detected via url) so we can
// overwrite the original CSS rule and decrease the text size
if (arg(0) == 'admin') { ?>
<style type="text/css">
td, th {font-size:10px; font-family: Verdana, Arial, Helvetica, sans-serif;}
</style>
<?php } ?>
<?php print $styles ?>
<?php print $scripts ?>
</head>
<?php
// Creates a <body> id for each site section.
$uri_path = trim($_SERVER['REQUEST_URI'], '/');
$uri_parts = explode('/', $uri_path);
// If the first part is empty, label the id 'main'. Change to 0 once domain is transferred over!!
if ($uri_parts[1] == '') {
$body_id = 'main';
}
else {
// Construct the ID name from the 2nd part of the URI.
// Change from value 1 to value 0 to change to first part URI.
$body_id = $uri_parts[1];
}
$body_id = 'section_'.$body_id;
print "<body id=\"$body_id\"";
print theme('onload_attribute');
print ">";
?>
<div id="containerouter">
<div id="containerleft">
<?php print $containerleft; ?>
<div id="blockleft_top">
<?php print $blockleft_top; ?>
</div><!--end #blockleft_top-->
<?php if ($blockleft_01): ?>
<div id="blockleft_01">
<?php print $blockleft_01; ?>
</div><!--end #blockleft_01-->
<?php endif; ?>
<?php if ($blockleft_02): ?>
<div id="blockleft_02">
<?php print $blockleft_02; ?>
</div><!--end #blockleft_02-->
<?php endif; ?>
<?php if ($blockleft_03): ?>
<div id="blockleft_03">
<?php print $blockleft_03; ?>
</div><!--end #blockleft_03-->
<?php endif; ?>
<?php if ($blockleft_04): ?>
<div id="blockleft_04">
<?php print $blockleft_04; ?>
</div><!--end #blockleft_04-->
<?php endif; ?>
</div><!--end #containerleft-->
<div id="containerright">
<?php print $containerright; ?>
<div id="blockright_top">
<?php print $blockright_top; ?>
</div><!--end #blockright_top-->
<?php if ($blockright_01): ?>
<div id="blockright_01">
<?php print $blockright_01; ?>
</div><!--end #blockright_01-->
<?php endif; ?>
</div><!--end #containerright-->
<div id="container">
<div id="header_image">
<!-- end #header --></div>
<?php if ($sidebar_right): ?>
<div id="sidebar_right">
<?php print $sidebar_right ?>
<!-- end #sidebar_right --></div>
<?php endif; ?>
<div id="mainContent">
<div id="mainContent_02">
<div class="prespace">
</div><!-- /#prespace -->
<?php if ($content_top): ?>
<div id="mainContent_02-top">
<?php print $content_top; ?>
</div> <!-- /#mainContent_02-top -->
<?php endif; ?>
<?php if ($breadcrumb or $title or $tabs or $help or $messages): ?>
<div id="content-header">
<?php print $breadcrumb; ?>
<?php if ($title): ?>
<h1 class="title"><?php print $title; ?></h1>
<?php endif; ?>
<?php print $messages; ?>
<?php if ($tabs): ?>
<div class="tabs"><?php print $tabs; ?></div>
<?php endif; ?>
<?php print $help; ?>
</div> <!-- /#content-header -->
<?php endif; ?>
<?php if ($content_middle): ?>
<div id="mainContent_02-middle">
<?php print $content_middle; ?>
</div> <!-- /#mainContent_02-middle -->
<?php endif; ?>
<div id="content-area">
<?php print $content; ?>
</div><!-- /#content-area -->
<!--end #mainContent_02--></div>
<!-- end #mainContent --></div>
<br class="clearfloat" />
<div id="footer"><div id="footer-inner" class="region region-footer">
<div id="footer-message"><?php print $footer_message; ?></div>
<?php print $footer; ?>
</div></div> <!-- /#footer-inner, /#footer -->
</div><!-- end #container -->
<br class="clearfloat" />
</div><!-- end #containerouter -->
<br class="clearfloat" />
<!-- Start of StatCounter Code -->
<script type="text/javascript">
sc_project=3711822;
sc_invisible=1;
sc_partition=44;
sc_security="2b57c9e7";
</script>
<script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><div class="statcounter"><a title="website statistics" href="http://www.statcounter.com/free_web_stats.html" target="_blank"><img class="statcounter" src="http://c45.statcounter.com/3711822/0/2b57c9e7/1/" alt="website statistics" ></a></div></noscript>
<!-- End of StatCounter Code -->
<!-- Begin Web-Stat code 2.0 http/html -->
<script type="text/javascript" src="http://server4.web-stat.com/wtslog.js">
</script><script type="text/javascript">wtslog('al129714','3','http');
</script><noscript><a href="http://www.web-stat.com">
<img src="http://server4.web-stat.com/3/al129714.gif"
style="border:0px;" alt="web statistics"></a></noscript>
<!-- End Web-Stat code v 2.0 -->
</body>
</html>
I am testing it out at http://www.crissi.com/leemag if you need to get there
The website where I need to get it to work is at http://www.lee-magazine.com
Things look great in IE 7 but a bit out of whack in IE 6:(
Thanks a lot,
Christine
Comments
I cut out the top part of my message with explanations....
Hi all,
By mistake I somehow cut out the top part of my above post with explanations just before I posted, so I am including a detailed explanation here....
What is happening is that no matter what I do, I am not able to get my website to recognize my conditional comments. I have tried several different things and right now my options are exhausted...I don't know what I am missing doing!
My website looks great everywhere except IE 6 so I needed to include a couple of conditional comments but I just cannot get my website to acknowledge them no matter what I do:(
I have tried the following methods:
1. Including the conditional comments in my header in my page.tpl.php between the
<!--[if IE]>and<![endif]-->tags, but no success:(2. I have tried this "Star-HTML hack" at http://www.positioniseverything.net/articles/cc-plus.html. I REALLY like this method! But I couldn't get it to work:(
3. I have installed the Conditional Stylesheets module at http://drupal.org/project/conditional_styles and followed the instructions from the post at http://drupal.org/node/245832 to add the IE stylesheets to my theme's .info file but no luck either:(
I included the above code for my page.tpl.php file so that you could check to see if anything is amiss...
(Yet my website seems to recognize the conditional comments in my node.tpl.php files!!)
Please can you help? I am really baffled!
Thanks a lot,
Christine
hmm..
i didn't read anything but the title because i dont have time right now BUT i thought I'd mention that IE cannot load more than 30 stylesheets at a time. If you have more than 30, likely because modules add stylesheets, than the conditional stylesheet wont load. a solution to this is to turn on aggregator.
Snyder Technologies
I have 21 stylesheets loaded all in all ...
I have 21 stylesheets loaded all in all ... a quick count from looking at the source code. I also have aggregator turned on.
I compared my custom page.tpl.php to the one from the garland theme and noticed I was missing the line
<?php print $head ?>from my header code so added that in. When viewed in IE 6 tho', it is still not picking up the stylesheet correctly:(Do you think my next course of action should be to add this code in to my header:
If none of the other methods worked, I don't know if this would either:(
Christine
Okay...everything is working now!!
My apologies everyone! It's all my fault.... adding in the
<?php print $head ?>fixed the issue. I did that just before I wrote the last post. I had thought it still wasn't working but it definitely did work after I cleared the cache in Drupal and then also did a shift-refresh in the browser.So basically, the main reason none of my attempts worked was because of that missing line of code in my page.tpl.php.
Right now I am using the Conditional Stylesheets module and have added in the necessary line/s to my theme's .info file and all is working perfectly!! YAHOO!!
I am actually secretly pretty glad I had this problem now because I have learnt a heck of a lot today with all the research I did, thanks to everyone here with all of the tremendous info in these forums!:) Out of all the methods I found out about, I really like using this method with the most...with the separate IE stylesheet.
(I am sooooo glad this is fixed, it has been bugging me for days!! The great thing too about writing in these forums to ask questions is that somehow it gets you thinking more clearly as you are writing it all down...)
Christine
Can you reproduce that?
Can you reproduce that? Sounds weird that omitting head would make any difference at all (main thing there would be the document character set / charater encodings), i.e nada to do with CSS.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
I don't believe it:( It is not working on my main site:(
I got it to work at http://www.crissi.com/leemag (the test site) but cannot get it to work at my main site http://www.lee-magazine.com.
I am ready to pull my hair out:(((
I have compared everything and it is set up exactly the same way. Do you think it could have anything to do with the htaccess file? (as strange sounding as that may be)
I am almost ready to throw the towel into the ring and surrender and just leave it the way it is in IE6.
I was SO happy just a few moments ago and now I'm miserable again:(( I just don't know what else to do.
If you look at the source code for http://www.crissi.com/leemag you will see that the stylesheet for IE 6 is loading and so it corrects the styles in the left column when the website is viewed in IE6, but it is not loading for http://www.lee-magazine.com.
Do you have any other suggestions?
Christine
Nnot really to be frank,
Nnot really to be frank, never used that module before (looks groovy though), I can only suggest the basics - such as clear the theme registry so the updated .info file gets pulled - I take thats how the module works - you add stylesheets to the mytheme.info file?
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
The versions of Drupal are different...
I have Drupal 6.2 on my site where the module works and the IE style sheets are pulled in correctly, but I have Drupal 6.4 installed on the main site where it isn't working as expected...
Okay...FINALLY!!!
As per http://drupal.org/node/286177
I added this in to my header in my page.tpl.php and all is FINALLY working now as it should!
Going to sleep now... nighty night...:)
Christine
**UPDATE**
Some more feedback, in case this may be helpful to anyone. To do all of my testing in the various browser versions of IE, I had been using "Multiple-IE". Prior to that I had IE 6 on one 'putr and IE 7 on another 'putr but was obviously finding that too cumbersome so had installed "Multiple-IE" instead. Well, I just found out that that may have been to blame for a lot of my issues during testing as the IE6 included with the program did not seem to be clearing the caches properly....and I only JUST found this out! If I had only known this earlier it prolly would have saved me a ton of grief! So actually, all this time, some of the methods may have very well been working... but just not showing up in my IE6. I installed IETester instead to view the website in there on IE 6 and it worked perfectly as expected...clearing the caches as expected when I did a clean refresh.
Just a hunch, I think your
Just a hunch, I think your selector is wrong.
You say it works on nodes?
My guess is you have no path alias set, so are spitting out /node/211 type paths - perhaps? That creates the #section_node selector on the body - hence it works on nodes since the CSS in the conditional comment specifically targets #section_node
Of course, I am wrong if you have a path alias set without "node" in it... a live test site would make this much easier to diagnose.
Your conditional comment is OK.
star html hack and underscore hacks work
So it aint any of that, cant be much else, 9 times out 10 - its the wrong selector (for what ever reason).
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
If you are looking for conditional css files
If you are looking for conditional css files, check out this module...
http://drupal.org/project/conditional_styles