Background join/login screen full screen

Dieter Marohn Posted in Theme Development 7 years ago

Hi Guys,

I'm Dieter, living in The Netherlands and setting up this peace of brain damage. But I'm getting there...

I have been trying this for about 5 hours and I'm giving up. Can somebody please show me how to make de background image a 100% height or a background: cover?

Here is a url to look at iof you want...
http://camchatgirl.nl/

It's going to be a community for webcam performers. No worries, no nudity, yet!

Thanks in advance,
Dieter

Replies
German J W Replied 7 years ago

<div class="bgimage bgimage-cover" style="background-image:url(...);"></div>

German J W Replied 7 years ago

It took days for me to find a good solution. When you place your background image as first child element of the body, it will be much easier. Best solution i found is like this:

<div class="bgimage bgimage-cover" style="background-image: url( '...' )">

.bg-overlay {
z-index: 0;
}

.bgimage {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index:-1;
overflow-y:scroll;
max-width:none;
width:100vw;
margin:0;
}

.bgimage-cover {
z-index:0;
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
}

Dutch Dieter Marohn Replied 7 years ago

@Rally Homelancer
Thank you!
That was exactly what is was looking for!

@Arsalan Shah Thank you, background-size:cover was exactly what i needed but didnt seem to work. The solution from Rally worked perfect!

Thank you!

ph Rally Homelancer Replied 7 years ago

@Dieter
I think I know what you mean.

Currently the login page shows something like this:
Where the background does not fully fill up the page even though the background was designed to fill up the page.
http://i.imgur.com/FpIUzdF.jpg

You want it to look like this:
Where the background is fully shown on the page.

http://i.imgur.com/DIvLQ5D.jpg

You could add this to your CSS:

   html { height:100%; }
    .opensource-socalnetwork { height:100%; }
    .ossn-page-container {height: 100%;}
    .ossn-inner-page { height:100%; }
    .ossn-layout-startup { height: 100%;}
Indonesian Arsalan Shah Replied 7 years ago

How do you mean by 100% height? however looking at your side shows that you added css property background-height which is invalid there is no background-height in css.

The background size is showing background-size:cover; isn't it what you wanted?