where to add my own css style sheet

where to add my own css style sheet

by Ye Chen -
Number of replies: 3

I am developing a new module, however I have to design an layout, i need to use my own css style sheet, where i can add it in my php script? Can I just simply include it in my php file?

if i do so, whether it will affect other moodle functions in moodle library?

Thanks

Ye

Average of ratings: -
In reply to Ye Chen

Re: where to add my own css style sheet

by Tariq Adel Al Ammadi -
Put it in a file called styles.php in your module/block's directory. The styles will be automatically appended.
In reply to Tariq Adel Al Ammadi

Re: where to add my own css style sheet

by Ye Chen -

I put my css file to a styles.php, it worked fine. Only one thing, the overflow:auto doesn't work.

Here is the css code for the settings

p.tbo{
width:100%;
height:100%;
overflow:auto;
}

If I include the css file before print_header, it will work. but if I put it after print_header, the overflow:auto won't work either.

Can anyone tell me why and how to fix it? Is there any rule I have to follow when writing something in styles.php?

Thanks

Ye

In reply to Ye Chen

Re: where to add my own css style sheet

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Try to force the overflow rule:
p.tbo{
 width:100%;
 height:100%;
 overflow:auto!important;
}