Importing style.css.

MKJ

Fledgling Freddie
Joined
Jun 5, 2004
Messages
1,196
Anyone know how the code necessary for a file to use a different portal theme when you change the theme design using the Template Chooser? Files I am referring too are the ones displayed in the wrapper (iframe). There must be a way to put the necessary code inside the files so they alter their styles along with the rest of the site.
 

SheepCow

Bringer of Code
Joined
Dec 22, 2003
Messages
1,365
What is this "Template Chooser" of which you speak? It sounds like you've got a script and you don't know how to use it.
 

Shovel

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,350
MKJ - You really would be better off directing Joomla specific questions to a dedicated Joomla support forum. As pleased as I am that you're learning with it, no-one else here has the faintest idea how to debug its specific templating system.

That said, to drag this back into the realm of platform agnostic web development, there are a couple of things to cover.

Firstly, there's the way in which you can use @import statements in CSS to neatly hide stylesheets from particular browsers. In fact, I believe there's one that may even hide it from Internet Explorer 6. This is extremely useful when separating your colours and typography from structure and layout in separate CSS files. It allows you to apply the former styles to all browsers as far back as Netscape 4, whilst restricting complex layout to modern, standards compliant software.

Second up is stylesheet switching. You can apply multiple stylesheets to a page and then select between them.

You do this by adding additional <link … /> elements for each stylesheet you want to include and ensure that you give them a title="" attribute. To be displayed in a desktop browser you obviously need to give them a media="screen" or media="all" attribute too.

Firefox allows you to choose between multiple screen stylesheets natively (‘View’ → ‘Page Style’ → ‘Stylesheet Name’). Other browsers require you to add a bit of script to invoke (and maintain) the switch. The best of these style switchers is the Invasion of the Body Switchers, at the excellent A List Apart.

Hopefully you'll find that useful both with your Joomla problem and web design generally.
 

Users who are viewing this thread

Top Bottom