Page 1 of 1
Center login box
Posted: 2019-07-23 14:23
by Moh Youba
Hello
How to center the login box
- login.jpg (32.3 KiB) Viewed 3871 times
Thank you
Re: Center login box
Posted: 2019-07-23 14:49
by jsetzer
You can use jquery to...
- remove $j("#login_splash")
- add class "col-sm-offset-3" to $j(".container > .row > .col-sm-6")
- add class "col-lg-offset-4" to $j(".container > .row > .col-lg-4")
That should do the trick.
For example add the following code to
hooks/header-extras.php:
Code: Select all
<script>
$j(function() {
if ($j("#login_splash").length) {
$j("#login_splash").remove();
$j(".container > .row > .col-sm-6").addClass("col-sm-offset-3");
$j(".container > .row > .col-lg-4").addClass("col-lg-offset-4");
}
});
</script>
Is this what you need?
- chrome_2019-07-23_16-48-14.png (19.09 KiB) Viewed 3869 times
Regards,
Jan
Re: Center login box
Posted: 2019-07-24 11:29
by Moh Youba
Hi Jan
Once again thank you for your great support, it is exactly what I want.
Best regards,
SOLVED: Center login box
Posted: 2019-07-24 11:30
by jsetzer
Great, glad to hear!
Best Regards,
Jan
Re: Center login box
Posted: 2019-07-24 19:11
by Moh Youba
- login_page.jpg (120.39 KiB) Viewed 3828 times
working fine
Thanks !
Re: Center login box
Posted: 2019-07-25 00:23
by baudwalker
Great job Jan,
One thing is the menu I set up according to Ahmed's online course (see top image) is now pushed below the login (see bottom image)
Barry
Re: Center login box
Posted: 2019-07-25 06:53
by onoehring
Hi baudwalker,
maybe this works when added after your additional text:
I tried myself - this does not seem to work, but I am currious how it can be done.
PS: in Ahmeds video he is using appendTo in the jquery. I tried with prependTo - without the result we hope for.
Olaf
Re: Center login box
Posted: 2019-07-25 07:15
by onoehring
Hi
I have a solution:
in Ahmends code make this change (prepend and new ID as well) (oh, my extra headline text has the ID info instead of the one in Ahmeds video):
Code: Select all
<script>
$j(function(){
$j('#info').prependTo('#introtxt');
})
</script>
change the code from jsetzer (above) to (2 new lines with new ID)
Code: Select all
<script>
$j(function() {
if ($j("#login_splash").length) {
$j("#login_splash").remove();
$j(".container > .row > .col-sm-6").addClass("col-sm-offset-3");
$j(".container > .row > .col-lg-4").addClass("col-lg-offset-4");
$j(".container > .row > .col-sm-6").attr('id', 'introtxt');
$j(".container > .row > .col-lg-4").attr('id', 'introtxt');
}
});
</script>
At this time it looks like - but how can the headline text be wider now?
- ec71.png (70.85 KiB) Viewed 3804 times
Olaf
Re: Center login box
Posted: 2019-07-25 08:16
by baudwalker
still working on the problem
Re: Center login box
Posted: 2019-07-25 08:36
by baudwalker
Thank you Olaf it works well... and thank you also Jan
Barry