Can you use CSS?

Can you use CSS?

by Melissa Benson -
Number of replies: 4
Can you use CSS after you add a resource like a web page or text page - basically anywhere you can put in HTML, can you use CSS? Are there limitations? Thanks.
Average of ratings: -
In reply to Melissa Benson

Re: Can you use CSS?

by Mauno Korpelainen -
Sometimes you can for example with span tags or classes - filters may cut some tags from editor and some css is taken from custom theme css - some activities have some restrictions...but if you add an external web page to resources (= a link to some page) that page has usually source code of it's own and all css is defined inside the page - not in moodle.
In reply to Mauno Korpelainen

Re: Can you use CSS?

by Melissa Benson -
How can you use span tags or classes and define those span classes and classes? Can you do the <.style> <./style> at the beginning then use that code later? I tried doing that when I composed the web page resource but I couldn't get it to work.

When you say the web page resource has source code of it's own - where is that? What do you mean by that. Do you mean I can't change it or Ican.

I really want to be able to have coding and css capabilities to really customize my layout and styles.

Is there perhaps a plug in or module that is useful for what I am looking to do? I have been trying to look at the Moodle Docs for more info on this.
In reply to Melissa Benson

Re: Can you use CSS?

by Mauno Korpelainen -

http://www.w3schools.com/css/default.asp has some examples of different ways to use css. If you need to use css inside some document you can use editor to add some tags and for example tinymce (the coming default editor in moodle 2.0) has a style plugin http://korpelainen.net/test19/mod/book/view.php?id=66&chapterid=18 

In htmlarea you can press <> in editor and write or copy and paste html and css from any other wysiwyg editor as well (for example from http://tinymce.moxiecode.com/example_full.php?example=true )

You may look at css files of moodle and take some class from them and use it with  tags like (after pressing <>):

<p class="unread">test 1</p>
<p style="color: red; text-align: center">test 2</p>

test 1

test 2

and so on. If you upload some web page to site or course files it can have links to custom css files inside the page itself and you may also embed web pages inside iframes to show those pages in a sort of "window" - iframe...

EDIT: There is a big difference if you add a link to a file (html page) http://docs.moodle.org/en/File_or_website_link
or compose a web page http://docs.moodle.org/en/Web_page

Check also http://moodle.tokem.fi/mod/book/view.php?id=16397&chapterid=7918 as a nice tutorial...

In reply to Mauno Korpelainen

Re: Can you use CSS?

by Melissa Benson -
Great, thanks for all of the information! My headsa spinnin' as we're in our first weeks of training staff!