The two-column (kubrick) theme revisited

The two-column (kubrick) theme revisited

by Chardelle Busch -
Number of replies: 8
Picture of Core developers
I was wondering what the latest was on this theme format. Any updates? I ask only because I still have a problem with the messaging discussion window. The user frame does not "resize" to fit the window, thus it is difficult to see. I've tried adding background-image: none; in various places, but nothing seems to work.
Here's the code that is printing the user picture and name if it helps:
print_header('','','','','',false,'','',false,'leftmargin="2" topmargin="2" marginwidth="2" marginheight="2"');
    echo '<table width="100%" cellpadding="0" cellspacing="0"><tr>';
    echo '<td width="100">';
    echo print_user_picture($user->id, SITEID, $user->picture, true, true, true, 'userwindow').'</td>';
    echo '<td valign="middle" align="center">';

    echo '<div class="name">'.fullname($user).'</div>';


See screenshot.


Attachment window.gif
Average of ratings: -
In reply to Chardelle Busch

Re: The two-column (kubrick) theme revisited

by Julian Ridden -
I believe the theme has a fixed width in the header. Changing this to make it set through CSS would be a start.

Then having a global size for the table set, and for the chat window have an !important size overide.

Does this make sense? Am I rambling?
In reply to Julian Ridden

Re: The two-column (kubrick) theme revisited

by Chardelle Busch -
Picture of Core developers
Hi Julian (did you get my latest email?),

I don't think (not sure) the header is the problem, since it isn't printed for this window.
In reply to Chardelle Busch

Re: The two-column (kubrick) theme revisited

by Chardelle Busch -
Picture of Core developers
In order for the frame for the user info at the top of the message discussion page to show properly, it needs to have no background image and a width of 100%.  But I can't seem to get it to behave that way with CSS.  For now I have commented out the page background image). I took out the body width completely (why is it there?) and then tried some things like:

body#message-user {
margin-left:10px;
margin-right:10px;
width: 100%;
}

body#message-messages {
padding:10px;
width: 100%;
}

But so far no luck. Anybody have any ideas? Thanks
In reply to Chardelle Busch

Re: The two-column (kubrick) theme revisited

by Urs Hunkler -
Picture of Core developers

Chardelle, in my themes I hide the header part of the messages and position the content with this CSS in the "Message" part of "styles_layout.css"

/***
 *** Message
 ***/

#message-user #header {
  display: none;
}
#message-user #content {
  margin-top: 0;
}

Does it work for you too?
Urs

In reply to Urs Hunkler

Re: The two-column (kubrick) theme revisited

by Chardelle Busch -
Picture of Core developers
Hi Urs,

No, that didn't work. But if I comment out print_header in message/user.php then it works (see screenshot), the only problem is there is no text styles, but I think that's better than not having the frame fit in the window. 

I don't know why CSS won't work on this particular frame.
Attachment window.gif
In reply to Chardelle Busch

Re: The two-column (kubrick) theme revisited

by Urs Hunkler -
Picture of Core developers

Chardelle, the changes I posted do not work with Kubrick because here the body and the page width are set.

I added the following CSS at the end of kubrick.css and on my Moodle installation it worked.

body.message,
body.message #page {
  width: auto;
  margin: 0;
  padding: 0;
}

#message-user,
#message-user #page,
#message-user #content {
  padding: 0;
  background: #FFF;
}

This is a patch to avoid the too wide content in the message window. It is not a true solution in the sense of the Kubrick theme. So David or Julian who are more involved in working with the Kubrick theme for Moodle could work out a fitting solution.

Does it work for you now?
Urs

Average of ratings: Useful (1)
In reply to Urs Hunkler

Re: The two-column (kubrick) theme revisited

by Chardelle Busch -
Picture of Core developers
Urs you're a doll.

Yes, that worked!!--finally (this little problem was quite painful).

Anyone using a fixed page/body width will have this problem with the messaging discussion page and should use this fix to CSS.
In reply to Chardelle Busch

Re: The two-column (kubrick) theme revisited

by Urs Hunkler -
Picture of Core developers

Chardelle, I am glad that it works for you now.

"Yes, that worked!!--finally (this little problem was quite painful)."

I investigated because I know how anoying those flaws can become wink

Urs