Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Moodle Theme Development

You're reading from   Moodle Theme Development Build customized themes to make your Moodle courses engaging and interactive

Arrow left icon
Product type Paperback
Published in Dec 2016
Publisher
ISBN-13 9781786463210
Length 302 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Silvina Paola Hillar Silvina Paola Hillar
Author Profile Icon Silvina Paola Hillar
Silvina Paola Hillar
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. An Introduction to Moodle 3 and MoodleCloud FREE CHAPTER 2. Themes in Moodle 3 on-premises and MoodleCloud 3. Setting Up Logos in Moodle Themes 4. Customizing the Header and the Footer 5. Customizing Elements with CSS 6. Locating, Editing, and Using New Icons 7. Optimizing Themes for Mobile Devices 8. Exploring Layouts 9. Course Formats 10. Extending Moodle Theming to Specific Sections A. Test Your Knowledge Answers

Customizing the height and width of an element with CSS

In previous chapters, we have learned how to add a logo to our Moodle course. In this chapter, we will learn how to customize the logo and how to change the number of pixels so that it fits the right height, by customizing our CSS.

Furthermore, we will use an online editor to understand how CSS works with an image and how the number of pixels varies. We can control the height and width of an element using CSS dimension properties. The height and width are automatically set to auto, that is to say, it is calculated by default by the browser.

In this case, we will change the default dimensions of the element. Therefore, these are the steps that we need to follow:

  1. Enter http://www.w3schools.com/css/default.asp.
  2. In the left-hand margin, click on CSS Height/Width , as shown in the following screenshot:

    Customizing the height and width of an element with CSS

  3. Read the information provided about height and width. Click on Try it Yourself, as shown in the following screenshot:

    Customizing the height and width of an element with CSS

  4. A new...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image