1
intosia
Different CSS on different pages?
  • 2007/5/26 14:44

  • intosia

  • Just popping in

  • Posts: 51

  • Since: 2005/7/23


Hi,

Im making a plugin that uses a ajax rating script, and that script requires a css file. Sure i can include that in the header of the theme. BUT i have 2 version running of the script (one small stars, one normal stars). So i have 2 different CSS files.

On the homepage i want the 'small CSS' and on a other page in mt plugin i want the 'normal CSS'.

Have can i switch between them in my header file?
Asian Chicks for Life! ^^

2
intosia
Re: Different CSS on different pages?
  • 2007/5/26 15:08

  • intosia

  • Just popping in

  • Posts: 51

  • Since: 2005/7/23


Nevermind i figured it out :)
Asian Chicks for Life! ^^

3
irmtfan
Re: Different CSS on different pages?
  • 2007/5/26 15:51

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


intosia,
could you share your code with us.Thank You

4
JMorris
Re: Different CSS on different pages?
  • 2007/5/26 16:27

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


One method...

<{if $xoops_dirname =="newbb"}>
<
link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_imageurl}>variablestyle.css" />
<{else}>
<
link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_imageurl}>style.css" />
<{/if}>


There may be better approaches though.
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

5
Will_H
Re: Different CSS on different pages?
  • 2007/5/26 17:11

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


The last css that is loaded is the one that will be visible.

(Think Myspace)

Which means that if you call for a stylesheet from your module, it will overwrite the theme stylesheet.

6
intosia
Re: Different CSS on different pages?
  • 2007/5/26 19:57

  • intosia

  • Just popping in

  • Posts: 51

  • Since: 2005/7/23


Well i set a Rating var in my plugin. Set it to Small or Normal, and use a if construction in the header :) (duh)

Another quick question; how can i show the comment form direcly under the comments it self? Like most weblog have.
Asian Chicks for Life! ^^

7
Anonymous
Re: Different CSS on different pages?
  • 2007/8/20 18:54

  • Anonymous

  • Posts: 0

  • Since:


Intresting topic

Login

Who's Online

359 user(s) are online (204 user(s) are browsing Support Forums)


Members: 0


Guests: 359


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits