• Resolved gcoulby

    (@gcoulby)


    I have a fresh 2012 installation and I can’t get rid of the margin on the bottom. I’ve tried alsorts I can’t make sense of it. my website is https://www.apalis.co.uk can anybody lend a hand.

    I just want height and width to be 100% and the bottom wont disappear.

Viewing 11 replies - 1 through 11 (of 11 total)
  • WPyogi

    (@wpyogi)

    If you mean the grey space at the bottom – that’s because your page is too short – add some content. Or set a minimum height for an element on the page.

    WPyogi

    (@wpyogi)

    Thread Starter gcoulby

    (@gcoulby)

    Yeah but can you not set up so that it is 100% height?

    I have added this code to the page div and it does nothing.

    #page {
    overflow: hidden;
    	background:#000;
    	display: block;
    	width:100%;
    	min-height:100%;
    	height:100%;
    }

    i also tried it on body .site again it’s still there.

    Thread Starter gcoulby

    (@gcoulby)

    Bad plugin code! it’s now been successfully validated. Thats a useful tool.

    WPyogi

    (@wpyogi)

    100% of what? (It does not know the screen size of a particular user.)

    Thread Starter gcoulby

    (@gcoulby)

    OK I have also added some content and it’s still there, just now you have to scroll to see it.

    Thread Starter gcoulby

    (@gcoulby)

    100% of the browser window. The width works dynamically and fills the width no matter how wide, surely the same can be done with the height. I want to put a scrolling div inside so this must be 100%x100%.

    WPyogi

    (@wpyogi)

    That margin is from here:

    body .site {
        box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
        margin-bottom: 3.42857rem;
        margin-top: 3.42857rem;
        padding: 0 2.85714rem;
    }

    So change your child theme CSS here – add the bottom margin to zero:

    body .site {
        margin-top: 0;
        padding: 0;
    }

    Using a tool such as Firebug is the best way to work with these kinds of CSS issues.

    Thread Starter gcoulby

    (@gcoulby)

    I can’t believe i missed it, i didn’t but i deleted it when I didn’t have any content. So this gets rid of the grey when I have some content, is there noway to force it to full screen without content?

    WPyogi

    (@wpyogi)

    You might be able to do it with absolute positioning, but be aware that all these changes to the theme’s CSS is likely destroying the responsiveness.

    body {
        bottom: 0;
        position: absolute;
        top: 0;
    }

    Thread Starter gcoulby

    (@gcoulby)

    Yeah that makes really weird behaviour, thanks anyway for helping me get rid of that bug in my code.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Theme 2012] Get rid of bottom margin’ is closed to new replies.