[SOLVED] Space between activity/resource and its description

[SOLVED] Space between activity/resource and its description

by Steve Towson -
Number of replies: 11

Hello.

Every theme I've tried has a huge amount of white space between any resource/activity and it's description (if you choose to show its description).

I would like to reduce this white space to what it used to be like in Moodle 2.2.

Please see the attached image.  The top image shows what it is like now, and the bottom image shows what I would like.

Can anyone please help?

(Edited by Mary Evans - original submission Saturday, 30 May 2015, 10:34 PM)

Attachment description.png
Average of ratings: -
In reply to Steve Towson

Re: Space between activity/resource and its description

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

From memory, it is the <p></p> tag that adds a margin.

If your theme has it's one settings page like Clean theme does,

Administration > Site Administration > Appearance > Themes > Clean (settings)

then you can try adding this to the CSS section in that page.

.section .activity .contentafterlink p {  margin: 0; }

Cheers

Mary

In reply to Mary Evans

Re: Space between activity/resource and its description

by Steve Towson -

Thanks Mary

That setting didn't seem to have any effect.

Regards

Steve

In reply to Steve Towson

Re: Space between activity/resource and its description

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Really? Well it works when I tested it in Moodle QA site today, which is Moodle 2.9.

Which theme are you using? And perhaps more importantly, since you did not say, which version of Moodle are you using?

Thanks

Mary

In reply to Mary Evans

Re: Space between activity/resource and its description

by Steve Towson -

Thanks Mary.


I was using Clean with Moodle 2.9.


In reply to Steve Towson

Re: Space between activity/resource and its description

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

OK...let me see if I can find a better solution, basically it's all about removing padding and margins that seem to pervade every area of Bootstrap themes. The older themes were better for that I must admit.

BRB

Mary

In reply to Steve Towson

Re: Space between activity/resource and its description

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

OK Steve... I think I've nailed it...ouch!

If you use these two CSS rules together, that should fix it ... smile

.section .activity .contentafterlink {  margin-top: 0; }
.section .activity .contentafterlink p {  margin: 0; }

Cheers

Mary

Average of ratings: Useful (2)
In reply to Mary Evans

Re: Space between activity/resource and its description

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

This seems to work for me, Mary.  I wonder what Steve might be doing wrong.  Or maybe he wants even less space.  Steve?

In reply to Rick Jerz

Re: Space between activity/resource and its description

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

That sounds so funny...less space?

In reply to Mary Evans

Re: Space between activity/resource and its description

by William Lu -
Picture of Particularly helpful Moodlers

Work for me on Moodle2.6 Clean theme as well.

Thanks a lot.

In reply to William Lu

Re: Space between activity/resource and its description

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Thank you William for confirming this works in Moodle 2.6.

Cheers

Mary

In reply to Mary Evans

Re: Space between activity/resource and its description

by Steve Towson -

Thanks so much!  The two lines of css work perfectly for "clean".

How do I include these  in a theme like "simple" which has no settings where I can enter over-riding css rules?

Thanks again.  Looks so much better like that!