Page 1 of 1
are different template views for different browsers possible
Posted: Fri Aug 05, 2005 11:56 pm
by verbatim
is it possible to edit the index.tpl & style.css files so that they perform one way in internet explorer and another way in netscape?
i would simply like to add a "<div>" in my style.css file but only to affect the template when it appears in a netscape browser?
how can this be done??
Re: are different template views for different browsers poss
Posted: Sat Aug 06, 2005 12:55 pm
by garvinhicking
You can do that either with
Code: Select all
<!--[if IE]>
type the stuff that only should appear in IE here
<![endif]-->
or you can use javascript browser-checks in your index.tpl to denote that. You could also write a plugin that uses different templates based on the HTTP string.
But I discourage all those efforts. Creating different pages for different browser shouldn't be done - you should always get similar results when using some CSS hacks, that should suffice.
Regards,
Garvin
Posted: Sat Aug 06, 2005 4:50 pm
by verbatim
thanks for the reply.
any idea why
this page looks different in IE and netscape?
all i did was add an image in the line right below the following code in the index.tpl
Code: Select all
div id="serendipity_banner">
<h1><a class="homelink1" href="{$serendipityBaseURL}">{$head_title|@default:$blogTitle}</a></h1>
<h2><a class="homelink2" href="{$serendipityBaseURL}">{$head_subtitle|@default:$blogDescription}</a></h2>
[/url]
Posted: Sat Aug 06, 2005 5:30 pm
by garvinhicking
Your CSS code has an error; check your definition in the CSS of #serendipity_banner. It is defined with
but of course your image is higher than 72px, so you need to adjust the #serendipity_banner element.
Regards,
Garvin