Multiple Stylesheets

Ruud

Quote from: cgryniewicz on November 09, 2008, 05:04:40 PM
Yea, I'm mainly having problems with IE 6. I've tried using conditional statements in index.php.


<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR?>/screen.css" media="screen" />
<!--[if IE 6]> <link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR?>IE6_hacks.css" media="screen"> <![endif]-->


But unfortunately IE  6 still loads screen.css.

Sure it will. This will load the IE6_hacks.css as an extra stylesheet for IE6.
In there you only add stuff needed to get IE6 to display better. The screen.css will always load.

There is no if - else - endif possible with these MS tricks. Other browsers will not recognise that.

Ruud
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

cgryniewicz

Still not working

Here is what I have.

<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR?>/screen.css" media="screen" />
<!--[if IE 6]> <link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR?>/IE6_hacks.css" media="screen"> <![endif]-->

Stefek

#4
Quote from: cgryniewicz on November 09, 2008, 05:04:40 PM
Yea, I'm mainly having problems with IE 6. I've tried using conditional statements in index.php.


<!--[if IE 6]> <link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR?>IE6_hacks.css" media="screen"> <![endif]-->

You missed a slash "/" after <?php echo TEMPLATE_DIR; ?>

Take a look  :wink:

Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

cgryniewicz

#3
Yea, I'm mainly having problems with IE 6. I've tried using conditional statements in index.php.


<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR?>/screen.css" media="screen" />
<!--[if IE 6]> <link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR?>IE6_hacks.css" media="screen"> <![endif]-->


But unfortunately IE  6 still loads screen.css.

My Project:
http://www.website-spinner.com

BerndJM

Hi,

to give a short answer:
yes there are some possibilities to give each browser a different stylesheet, but ...

... I think this is the wrong way!
What's so "difficult" or let's say "strange" in your template to make it look similar in different browsers?
Never seen a template, that's not equal in different browsers - when it has a correct! stylesheet syntax, o.k. maybe there is some "help" needed for IE6 (conditional comments), but all the other browsers should be handled with a "normal standard conform" CSS.

Maybe it would be helpfull if you provide a URL to your project?

Regards Bernd
In theory, there is no difference between theory and practice. But, in practice, there is.

cgryniewicz

I need help, designing a template. Currently my design looks very different from browser to browser. Is there anyway I can attach multiple stylesheets? Each browser could open their respective style sheet. How would this work with WebsiteBaker?