Beruflich Dokumente
Kultur Dokumente
This resource is intended to guide you through a few responsive web design techniques to improve view-ability of your Moodle course on any device.
We will keep these items in mind as we discuss laying out your course using Moodle.
The built in MyMobile theme was the first approach to laying an eLearning environment differently according to devices. The MyMobile theme rearranged the navigation structure and block layout. Blocks were put in a "menu" button to de-clutter the page. Navigation was also put in a button. The page itself was streamlined into a one column approach to capitalize on space.
Starting with version 2.5, Moodle now offers a bootstrap base theme that can be used as a responsive base for any new theme developed. It also offers a theme called Clean themethat uses this base for a responsive design. These themes are designed to declutter the page and to adjust navigation and content based on the size of the screen viewing it. These themes have built in style sheets that detect and adjust added content
Moodle editor will assign a width and height based on the image size or on the content placed. Using a % value instead of a constant number in pixels or adding a max-width and min-width will help the screen layout the content according to the size of the screen. See the next pages for examples of how to use custom tools to aid in this process.
The first copy has a max-width of 100% in relation to the container it is in. The second is at a max-width of 50%. For both the height is set to auto. Make your browser skinnier to see the effects of screen width on the images below. Notice how both proportionately shrink until they have reached the min-height value (25% of the original value)
1. 2. Locate the image you would like to use by selecting Find or Upload Image and locating it in the File picker. 3. Once selected, your Image properties box will display and click the Appearance Tab
4. In the Appearance Tab, clear any number values from the Dimensions Boxes 5. Fill in the Style field with your max- and min-width values and height: auto. 1. For Example: max-width: 90%; min-width: 35%; height: auto;
6. Click Insert
Sometimes it becomes necessary in Moodle to use a table as a container to lay things out. I see this done many times to make a course more compact. Here is an example: using a table with icons and link to different parts of the course to streamline the look of Moodle. This is a great design idea, but can give headaches when portions of the table do not show up for smaller screens or even in Moodle if the theme is changed. Here is a way to make a responsive table to adapt to any device and work with any theme. By default, the table will automatically fill a space in Moodle as content is added. The table becomes a problem when content is added like an image that has a specific width that is larger than the screen width. Here's what it looks like and on the following page, how to fix it. Here is a Icons Table in Moodle in a standard window.
Here it is what happens if the screen size is less than the total accumulated value of the pictures + cell-space combined. Notice the Scroll Bar appears and an image is missing from view.
2. In the Table Properties box, click Advanced tab. In the style field type the following: table-layout: fixed; width: 100%;
3. Click Update Now we have a responsive table. Next we have to make each image responsive as well. We will use the same method as before; clearing the number value in pixels and using max-width set to 100% and min-width set to 45% in the style field.
Now our table and images will shrink and grow with the screen size.