Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 27, 2012, 05:13:39 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
155555
Posts in
21715
Topics by
7737
Members
Latest Member:
gx-world
WebsiteBaker Community Forum
English
Archive (posts up to 2007)
(Moderator:
Argos
)
Using conditional CSS stylesheets for Internet Explorer
Pages: [
1
]
Go Down
Author
Topic: Using conditional CSS stylesheets for Internet Explorer (Read 920 times)
sam
Offline
Posts: 8
Using conditional CSS stylesheets for Internet Explorer
«
on:
December 05, 2007, 09:59:36 PM »
I want to use a conditional stylesheet so that my CSS displays properly in internet explorer. I have searched the forums here, but can't find how to make this work properly.
I have put the following in the header of my index.php file:
<head>
<title><?php page_title('', '[WEBSITE_TITLE]'); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else { echo 'utf-8'; }?>" />
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<!-- style sheet links -->
<link href="<?php echo TEMPLATE_DIR; ?>/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo TEMPLATE_DIR; ?>/menu.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo TEMPLATE_DIR; ?>/menu2.css" rel="stylesheet" type="text/css" media="screen" />
<!-- if [IE 6]><link href="<?php echo TEMPLATE_DIR; ?>/ie56.css" rel="stylesheet" type="text/css" media="screen" />
<![endif]-->
</head>
<body>
This is not working; internet explorer is still displaying the same style.css stylesheet, not the ie56.css one.
How do I make this work correctly?
Thanks!
Logged
ruebenwurzel
WebsiteBaker Org e.V.
Offline
Posts: 7973
Re: Using conditional CSS stylesheets for Internet Explorer
«
Reply #1 on:
December 06, 2007, 04:48:20 AM »
Hello,
you are here in the WB forum. This is no WB question it is more a css or browser related question. So have a look on the bookmarks list on our help page or simply try googling.
Thanks
Matthias
Logged
sam
Offline
Posts: 8
Re: Using conditional CSS stylesheets for Internet Explorer
«
Reply #2 on:
December 06, 2007, 01:05:24 PM »
Hi Matthias -
Thanks for your response. I know that this is more a CSS related question than WebsiteBaker directly, but I've googled, and looked in reference books about CSS; as far as I can see, this should work. I posted it here to see if there was some glitch I need to be aware of with website baker that stops this from working, or some other way I need to present the code.
I'm still at a loss as to why it's not working! Everything I can see says it should...
Thanks
Sam
Logged
sam
Offline
Posts: 8
Re: Using conditional CSS stylesheets for Internet Explorer
«
Reply #3 on:
December 06, 2007, 02:45:08 PM »
I have now fixed this; the correct code is as follows:
<head>
<title><?php page_title('', '[WEBSITE_TITLE]'); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else { echo 'utf-8'; }?>" />
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<!-- style sheet links -->
<link href="<?php echo TEMPLATE_DIR; ?>/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo TEMPLATE_DIR; ?>/menu.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo TEMPLATE_DIR; ?>/menu2.css" rel="stylesheet" type="text/css" media="screen" />
<!--[if IE]><link href="<?php echo TEMPLATE_DIR; ?>/ie56.css" rel="stylesheet" type="text/css" media="screen" /><![endif]-->
</head>
<body>
Apart from anything else, I'd made a transcription error in the example I gave at the top of this thread, placing "if" outside the square brackets at the beginning of the IE conditional call! I had this correct in my actual code, but it still wasn't working. The code above works perfectly.
Logged
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...