-
AuthorPosts
-
woluweb Friend
woluweb
- Join date:
- October 2012
- Posts:
- 196
- Downloads:
- 18
- Uploads:
- 69
- Thanks:
- 68
- Thanked:
- 31 times in 3 posts
April 9, 2014 at 3:51 pm #196601Hello,
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
wingly Friendwingly
- Join date:
- February 2014
- Posts:
- 310
- Downloads:
- 0
- Uploads:
- 87
- Thanks:
- 80
- Thanked:
- 83 times in 48 posts
woluweb Friendwoluweb
- Join date:
- October 2012
- Posts:
- 196
- Downloads:
- 18
- Uploads:
- 69
- Thanks:
- 68
- Thanked:
- 31 times in 3 posts
April 9, 2014 at 4:31 pm #530139Hi Wingly !
Txs for the quick reaction.
I have immediately tested : it works for the disconnect button on top of the siteBut 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 Friendwingly
- Join date:
- February 2014
- Posts:
- 310
- Downloads:
- 0
- Uploads:
- 87
- Thanks:
- 80
- Thanked:
- 83 times in 48 posts
wingly Friendwingly
- Join date:
- February 2014
- Posts:
- 310
- Downloads:
- 0
- Uploads:
- 87
- Thanks:
- 80
- Thanked:
- 83 times in 48 posts
April 10, 2014 at 6:00 am #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!
1 user says Thank You to wingly for this useful post
woluweb Friendwoluweb
- Join date:
- October 2012
- Posts:
- 196
- Downloads:
- 18
- Uploads:
- 69
- Thanks:
- 68
- Thanked:
- 31 times in 3 posts
April 10, 2014 at 9:32 am #530299Hi 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 Friendwingly
- Join date:
- February 2014
- Posts:
- 310
- Downloads:
- 0
- Uploads:
- 87
- Thanks:
- 80
- Thanked:
- 83 times in 48 posts
April 10, 2014 at 9:50 am #530303the 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-vousIF you post me like this i will be able to make it work for you.
-
1 user says Thank You to wingly for this useful post
woluweb Friendwoluweb
- Join date:
- October 2012
- Posts:
- 196
- Downloads:
- 18
- Uploads:
- 69
- Thanks:
- 68
- Thanked:
- 31 times in 3 posts
April 10, 2014 at 9:44 pm #530437Hi @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 Friendwingly
- Join date:
- February 2014
- Posts:
- 310
- Downloads:
- 0
- Uploads:
- 87
- Thanks:
- 80
- Thanked:
- 83 times in 48 posts
woluweb Friendwoluweb
- Join date:
- October 2012
- Posts:
- 196
- Downloads:
- 18
- Uploads:
- 69
- Thanks:
- 68
- Thanked:
- 31 times in 3 posts
April 11, 2014 at 10:07 am #530530That 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 ?-
wingly Friend
wingly
- Join date:
- February 2014
- Posts:
- 310
- Downloads:
- 0
- Uploads:
- 87
- Thanks:
- 80
- Thanked:
- 83 times in 48 posts
April 11, 2014 at 10:11 am #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;
1 user says Thank You to wingly for this useful post
woluweb Friendwoluweb
- Join date:
- October 2012
- Posts:
- 196
- Downloads:
- 18
- Uploads:
- 69
- Thanks:
- 68
- Thanked:
- 31 times in 3 posts
April 11, 2014 at 10:20 am #530539I have just edited my last thread with some potential improvement of the solution π
wingly Friendwingly
- Join date:
- February 2014
- Posts:
- 310
- Downloads:
- 0
- Uploads:
- 87
- Thanks:
- 80
- Thanked:
- 83 times in 48 posts
April 11, 2014 at 10:24 am #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
1 user says Thank You to wingly for this useful post
-
AuthorPosts
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
Jump to forum