WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: cgryniewicz on November 09, 2008, 06:56:56 AM

Title: Multiple Stylesheets
Post by: cgryniewicz on November 09, 2008, 06:56:56 AM
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?
Title: Re: Multiple Stylesheets
Post by: BerndJM on November 09, 2008, 08:55:42 AM
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
Title: Re: Multiple Stylesheets
Post by: 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.

Code: [Select]
<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
Title: Re: Multiple Stylesheets
Post by: Stefek on November 09, 2008, 05:10:09 PM
Yea, I'm mainly having problems with IE 6. I've tried using conditional statements in index.php.

Code: [Select]
<!--[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
Title: Re: Multiple Stylesheets
Post by: cgryniewicz on November 09, 2008, 05:35:07 PM
Still not working

Here is what I have.
Code: [Select]
<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]-->
Title: Re: Multiple Stylesheets
Post by: Ruud on November 10, 2008, 12:03:20 AM
Yea, I'm mainly having problems with IE 6. I've tried using conditional statements in index.php.

Code: [Select]
<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