News:

Wondering if this will always be free?  See why free is better.

Main Menu

Just a short question for the main devs

Started by Chen Zhen, January 01, 2015, 07:05:20 PM

Previous topic - Next topic

Chen Zhen

Hello,

  What I am about to mention may be the appearance for other display behaviour but I noticed this during one such occurrence that I would like to ask a question about. It is regarding css..

When it asks for a password to continue the session (ie. Admin session) the footer appears very large and #content_section appears shortened which seems to be different from the general appearance of most other pages. When this happens there is a lot of space under the copyright text. Is this intentional or would it be preferable to be uniform with the appearance that I generally see?

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Antechinus

That's just the container collapsing to suit content, which is default behaviour for any div. You can add more code to get around it (ie:larger min-height) but then you still have a big empty div with a form at the top. IF you prefer that look, just increase the min-height on the content section. Be aware that trying to fit it to screen height is an exercise in madness. It's one min-height for all (or at least most) screens if you value your sanity.

Antes

try to add min-height: 650px to #wrapper element you'll see its no improvement.

Antechinus

In theory you could use media queries to grab the screen height, then make assumptions about what toolbars and other crud your users might have enabled, then add piles of responsive CSS to plonk in nicely scaled pix of fluffy kittens and rainbows to fill up the rest of the page.

Of course, you'd be bonkers to do that, but it's possible.

Chen Zhen


Actually I put together something using jQuery that will probably do the trick after I work it properly.

function resizeContentSection()
{
var top = $('#top_info').height();
var header = $('#header').height();
var footer = $('#footer_section').height();
var total = top + header + footer;
$('#content_section').css({'min-height': $(document).height() - total + 'px'});
}


Then you run the function with ie. window.onload, the current problem with my above code is that the footer height is null. It needs some adjustment/tuning but I think it can work with something similar.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Antechinus

Yes, you can do it with jQuery or with raw javascript too. Is it worth it? Up to you, but arguably not worth the extra code.

Chen Zhen


My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Advertisement: