Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • woluweb Friend
    #196601

    Hello,

    I feel a bit stupid on that one, but look what I have on my JA Mero website I am developing :

    Actually, I have published a “login” form (with access set to “registered”) on LanguageSwitcher position.
    Fine.

    The only thing is that the “disconnect” button is not aligned to the right, which is what I want.

    I first tried to play with the “span8 – span4” in header.php to set it to “span10 – span2” for example, but this break the layout in responsive format.

    Then I went into the code : actually, the class of the languageswitcher position already has a “float: right;” :

    <div class="span4 pull-right">
    <form action="/professionnels/bienvenue" method="post" id="login-form" class="form-vertical">
    <div class="logout-button">
    <input type="submit" name="Submit" class="btn btn-primary" value="DΓ©connexion">
    <input type="hidden" name="option" value="com_users">
    <input type="hidden" name="task" value="user.logout">
    <input type="hidden" name="return" value="xxxx=">
    <input type="hidden" name="xxxx" value="1"> </div>
    </form>

    </div>

    Then I went further and saw that editing the code from the console (F12) to add a “float:right” to the *form* element would do the trick ! But too bad, then all the forms on my site are right-aligned πŸ™

    form {
    margin: 0 0 20px;
    float: right;
    }

    So my final question is : how do I right-align this form (button) but only for that module (published in LanguageSwitcher position) ?

    Txs,

    Marc


    1. 2014-04-09_17h41_31
    wingly Friend
    #530137

    @woluweb;

    Replace your code with this one


    form div.logout-button{
    margin: 0 0 20px;
    float: right;
    }

    Please keep me updated on how it worked. Thank you

    woluweb Friend
    #530139

    Hi Wingly !

    Txs for the quick reaction.
    I have immediately tested : it works for the disconnect button on top of the site

    But still, it is not the perfect solution, as it will right-align all my disconnect buttons in all modules.

    Do you see any mean to make it “conditional”, namely that it would only right-aligned for that particular module (or in that particular position) ?

    Still, it is already an excellent temporary solution πŸ™‚

    Txs,

    Marc

    wingly Friend
    #530140

    @woluweb;

    Yes. I can manage it work only for this one. As posted in another thread i need login details n PM and i’ll make it work for you as soon as i reach a pc. I’m from mobile currently.

    Thank you for your patience

    wingly Friend
    #530250

    @woluweb ;

    Sorry to get so late back to it, so i have checked for the module, and the only disconnect button i see is the one on top right assigned to all the pages. Where else do you have the disconnect buttons? please provide a link. Cause the only other one i see is here and it is not right aligned.

    Thank you!

    woluweb Friend
    #530299

    Hi Wingly,

    Sorry I was not more explicit in my message. I juste wanted to make it simple.
    In fact, given the fact the disconnect button was right-aligned not only in my languageswitcher position but everywhere, I have temporarily put my main login module on “guest” instead of “public”.

    But my question remains.

    I have even tried to create a class “wingly-right” and I add the class “wingly-right” to the module to try to make it “conditional”, but it does not work :

    .module.wingly-right {
    form div.logout-button {
    margin: 0 0 20px;
    float: right;
    }
    }

    I must have missed something… πŸ™‚

    Txs again & see you soon probably,

    Marc

    wingly Friend
    #530303

    @woluweb;

    the css you try to make is wrong ) and yet still i do not understand completely what you mean. Ok PM me with FTP credentials and also report public in this thread with deeper explanation with links and printscreens and show me what button where is displayed wrong and where you want it to be situated so i need smth like this:

    Example:
    http://lejourlepluscourt.be/participer/votre-compte/connectez-vous

    IF you post me like this i will be able to make it work for you.


    1. woluweb
    woluweb Friend
    #530437

    Hi @wingly,

    You are very helpful ! πŸ™‚

    Right now I lack time as I go to ski tomorrow morning.
    Still many things to finish up before leaving, so no time for screenshots etc.

    I see your screenshot. You have a sort of narrow layout. This is not the case/trouble I had.

    Let me just rephrase :
    the following code works great, but for *all* login modules on the website, the logout button will be right aligned.
    form div.logout-button {
    margin: 0 0 20px;
    float: right;
    }

    The only thing I want is the following : on only *one single* login module (ie for the login published in my case on LanguageSwitcher position) I want the disconnect button to be right-aligned.

    Maybe my explanation is a bit clearer like this.
    I hope so πŸ™‚

    Txs,

    Marc

    wingly Friend
    #530526

    @woluweb ;

    I have done it directly on your site. Check; Erase this custom cause i wrote it in another place. and check;

    Keep me up to date with the result. Thank you

    woluweb Friend
    #530530

    That works great !

    Before (with the code as shown on previous msgs on this thread) :

    After

    Still, I was trying to figure out how you did (so that I have learned something, but also so that others reading us can learn something πŸ™‚

    I have seen you have added the following in /templates/ja_mero/css/custom.css

    .wingly .logout-button {
    margin: 0 0 20px;
    float: right;
    }

    and the following in /templates/ja_mero/tpls/blocks/header.php

    <!-- LANGUAGE SWITCHER -->
    <div class="wingly span4 pull-right">
    <jdoc:include type="modules" name="<?php $this->_p('languageswitcherload') ?>" style="raw" />
    </div>

    Was it indeed all you changed ?

    Thanks a lot really, Wingly !
    I’ll remember that technique for other types of uses πŸ˜‰

    Yours,

    Marc

    Thinking twice about it, maybe we could even improve your solution.
    Instead of editing header.php, which would break the customization in case of update of the template, why not simply leave header.php alone and add the wingly in the “css class suffix” of the module itself.
    A second advantage is that I can then use this class for any other module in any other position.
    Am I right ?


    1. 2014-04-11_11h52_48
    2. 2014-04-11_11h55_00
    wingly Friend
    #530535

    @woluweb ;

    Yes, this is exatcly what i have done; plus make sure any custom CSS you implement, do not touch any css file except the custom.css in the css folder. It will override any proprieties and options as it is the last css file to be loaded. So when you will have an update all your css changes will be kept. But if you do in other css files they will be erased.

    The only thing to take care of is the changes in the blocks;

    Glad to know it worked. Have a good day, and thank you for patience.

    p.s. This method is related to any web-site that uses T3-Framework;

    woluweb Friend
    #530539

    I have just edited my last thread with some potential improvement of the solution πŸ™‚

    wingly Friend
    #530542

    <em>@woluweb 421246 wrote:</em><blockquote>That works great !

    Thinking twice about it, maybe we could even improve your solution.
    Instead of editing header.php, which would break the customization in case of update of the template, why not simply leave header.php alone and add the wingly in the “css class suffix” of the module itself.
    A second advantage is that I can then use this class for any other module in any other position.
    Am I right ?</blockquote>

    yes it’s true, usually i just add custom suffix and everything works. But in your case the custom suffix din not want to be added. So in order not to loose too much time on this question i have done it in a most easy and fast way.

    p.s. good thinking

Viewing 13 posts - 1 through 13 (of 13 total)

This topic contains 13 replies, has 2 voices, and was last updated by  wingly 10 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum