Top Margin problem

Top Margin problem

John C.發表於
Number of replies: 3

Greetings everyone.

I recently created a new theme from the formal_white theme, and since I've converted it to be compatible with Moodle 1.6, I can't seem to remove the white border/margin around the header of the screen: http://moodle.tmsstage.com/

I've looked at every style, and have tried adding simple HTML into the body (topmargin=o, leftmargin=0) but nothing seems to remedy the problem.

Does anyone know what is causing this?

Thank you!

評比平均分數: -
In reply to John C.

Re: Top Margin problem

Patrick Malley發表於
I kinda like it. 微笑

My guess is that this value (found in meadows/fw_fonts.css) is creating the margin and, as such, should be deleted:

body {
margin : 5px;
}

This should get rid of the 5px margin you don't like.
評比平均分數:Useful (1)
In reply to John C.

Re: Top Margin problem

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片

Hi John,

There are several things you could try. But first of all I notice that in your theme's header.html file there is this:

<body topmargin="0" leftmargin="0" etc.

These attributes are totally deprecated and should not be used. You could instead use:

<body style="margin-left:0px; margin-top:0px;"

Or, in one of your theme's CSS files you could check where body is defined and put:

body  {
  margin-left:0px; 
  margin-top:0px;
}

Also, in your theme's header you are using the <hr> tag, which is not needed since you have a logo.

See attached screen shots.

Hope that helps,

Joseph

附件 image-0000.jpg
評比平均分數:Useful (1)
In reply to Joseph Rézeau

Re: Top Margin problem

John C.發表於

Thank you both so much! I can't believe it was such a simple tweak - as I'd seriously gone through every other style and couldn't get it to work.

 

Thank you both.

John