Fork me on GitHub



Make donations with PayPal!
Goal: $100.00
Due Date: Oct 31
Gross Amount: $25.00
Net Balance: $23.72
Left to go: $76.28

kakos  ($25)Oct-25

GitHub Twitter

Learn XOOPS Core

Local Support


XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 4 6 admin adslight Android AntiHarvesting AntiSpam API Apple Battlefield billige Blocks Bootstrap Captcha cell cent chronolabs Clicks Cloud content CĂN demo download Dresses facebook Fat floor Gateway giải Google Guide herre Home Honeypot html5 Human HỘ IP iPhone jQuery Language Law Legal List Loss module modules Monster new newbb news nhiệt NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher RESIDENCE responsive review Rights Room security Sentry Signatures Signed site Smartphone Smarty Smoking Solution Spam stem Studio support tag tdmcreate The Theme themes tháp User userlog weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 139454


Welcome to XOOPS!

Bottom   Previous Topic   Next Topic  |  Register To Post

#1 Posted on: 2011/1/2 0:29 How many .css sheets are used with xoops and where are they?
Ok, I am curious how the .css structure of xoops is designed?

There is a xoops.css

and most themes at minimum have a style.css.

Been told we can put a style.css in with the module as well.

I am curious how this works and how it all ties together?

How do these all get used?

Is the xoops.css read first then the theme style.css then the module style.css? Then by inheritance they would be read in that order so module style.css would override theme.css which would override xoops.css?




2008/2/26 11:05
From Grand Rapids, MI
Registered Users
Posts: 1292
(Show More) (Show Less)

#2 Posted on: 2011/1/2 8:54 Re: How many .css sheets are used with xoops and where are they?
if you open the source code of a website using xoops by using the browser you will see something like this

<!-- Sheet Css -->
link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="" />
link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="" />
customized header contents -->

the 2 first stylesheet are both called from the file theme.html
so that xoops.css will be the first stylesheet to load containing some css resets concerning some xoops elements (banner,blocks,....)

after that style.css contain the enhancement part (styling with images ..) and because it's after xoops.css it can override some css rules if you change them in style.css

after that come the tough part
<!-- customized header contents -->

here xoops put all css stylesheets called by php or the ones that change depending on some parameters
- like modules, some modules requires some css styling so they can add style sheet just by adding in the php side
$xoTheme->addStylesheet(XOOPS_URL '/modules/yourmodule/style.css');

- like language some langage use right align and rtl so xoops add a style sheet arabic.css or english.css that have a big reset with a lot of !important

that is the big idea behind the magic of xoops css
I hope that you caught the idea


2010/2/3 6:02
From Morocco
Registered Users
Posts: 162
(Show More) (Show Less)

#3 Posted on: 2012/5/25 5:28 Re: How many .css sheets are used with xoops and where are they?
The strange thing is that even though some modules include additional css files, they do not appear in the final webpage if the theme is change. I currently have the problem with wfdownloads.

Can you tell me in which php script the css files added by $xoThemes->addStylesheet(...) are included to the html file in the section
"customized header contents"?

And why is this include successfull for the "default" theme, but fails for others?




2012/5/3 10:22
From Taiwan
Registered Users
Posts: 14
(Show More) (Show Less)

You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[Advanced Search]