How can I change the width of the lessons?

How can I change the width of the lessons?

by mark zuber -
Number of replies: 7

I need to change the width of the lessons to about 80%. Someone has asked similar question before, and the answer was to use slide show settings but is there any another way to change width of the existing lessons? Can I modify theme styles or a script to change the width?

Mark

Average of ratings: -
In reply to mark zuber

Re: How can I change the width of the lessons?

by James Robertson -

Hi Mark,

I would like to know that also -- thanks for bringing it up again.

Jim.

In reply to mark zuber

Re: How can I change the width of the lessons?

by Mark Nielsen -
Alrighty, the change is very simple.  Open up mod/lesson/view.php and search for the following line:

print_simple_box(format_text($page->contents), 'center');

In my code, it is at line number 558.

Change the above line to:

print_simple_box(format_text($page->contents), 'center', '80%');

And that's it!  The only problem with this change is that every page will have this width.  So if you have a page with very little content, it might look a little funky.  Perhaps someone could post a better method for printing out the page contents? big grin

Cheers,
Mark
In reply to Mark Nielsen

Re: How can I change the width of the lessons?

by mark zuber -

Thank you all for your replies.

Mark Zuber

In reply to Mark Nielsen

Re: How can I change the width of the lessons?

by Erik Ringmar -
Hi Mark,

Thanks for this!  Very neat.  It saved my pages since I can't seem to load the slide show for some reason.

cheers,

Erik
In reply to Mark Nielsen

Re: How can I change the width of the lessons?

by Dan Hilke -

I wish I'd known this before...  Thanks!

I've been creating a table with 80% width on every page to put the content in.  That works, but this will be MUCH easier!

Dan

In reply to Dan Hilke

Re: How can I change the width of the lessons?

by Erik Ringmar -
Hi again,

I'm getting a bit greedy ... any way to change the colour of the text surrounding the window with the text?  It looks a bit white and boring with my standard theme.

cheers,

Erik
In reply to Mark Nielsen

Re: How can I change the width of the lessons?

by Chuck Kimball -

That worked for me in 1.8.3.  Can you change it to an absolute value like 600 px rather than a percentage?

Thanks!

Chuck