Width parameter ineffective

Width parameter ineffective

by James Robertson -
Number of replies: 3

I have been using <div style="WIDTH: 85%"> in resource html files and it seems to work fine, either with or without custom stylesheets.  But with assignment and workshop, even though it looks fine in the html editor (wysiwyg mode), text on the actual page uses 100% of the available width (with or without custom stylesheets).  I am using 1.4.4; is this a bug, am I overlooking something obvious, or is it the intended result?

Jim Robertson.

Average of ratings: -
In reply to James Robertson

Re: Width parameter ineffective

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It's possible the "width" is being stripped out by cleaning, can you check the source of the page?
In reply to Martin Dougiamas

Re: Width parameter ineffective

by James Robertson -

Hi Martin,

Width remains, though it gets changed to upper case.  When I pasted the code below into a blank resource, it displayed as expected in the editor and after "save changes".  Then I pasted it into a blank assignment and it displayed the same in the editor, but ignored width after "save changes."  But then when I went back to them from the course menu, they both displayed the same, sometimes correctly and sometimes across the full frame width.  Something (I don't know what) seems to toggle which is happening.

Here's my test code, copied back from the editor after testing:

<div align="center"><div style="WIDTH: 65%" align="left"><p>Please contrast the behavioral versus the social constructivist implications of &quot;The quick brown fox jumped over the lazy dog.&quot;</p><p>Type your essay in any word processor, then submit it to your instructor using the form provided.</p></div></div>

I'll do some more checking and add another note if I learn more.

Thanks,

Jim.

In reply to Martin Dougiamas

Re: Width parameter ineffective

by James Robertson -

A little more information: when I tried again on the school site, I found I couldn't establish a pattern--on initial entry both looked good.  Then after some selecting of Update Assignment and using the jump forward & back arrow I got 100% width again and couldn't get it to go back right.  In the end I defined a div.bodytext class with the desired width percentage in styles.php, and that seems to give me stable results.

Incidentaly, is there a way to move Due date and Maximum grade so they display at the end of the user text instead of at the start?  That way they would appear just above the submission status and form.

Thanks,

Jim.