account_visitor_menu
<a href="{{ link('logout', null, {'t': csrf_token()}) }}" class="menu-linkRow">{{ phrase('log_out') }}</a>
<a href="{{ link('logout', null, {'t': csrf_token()}) }}" class="menu-linkRow"><xf:fa icon="fas fa-sign-out-alt" />
{{ phrase('log_out') }}</a>
menu-linkRow
with that.<a href="{{ link('logout', null, {'t': csrf_token()}) }}" class="menu-linkRow your-class">
{{ phrase('log_out') }}</a>
.your-class
{margin-left:auto;
margin-right:auto;
width:100px}
.your-class
{margin-left:auto;
margin-right:auto;
display:table}
You went further than me, but in his example there are borders for depth, and then we're not even accounting for style variant changes if on 2.3, as to why I left it simple.Try this
In account_visitor_menu
Code:<a href="{{ link('logout', null, {'t': csrf_token()}) }}" class="menu-linkRow your-class"> {{ phrase('log_out') }}</a>
And in template extra.css add this
CSS:.your-class {margin-left:auto; margin-right:auto; width:200px}
(alternatively you could style inline as you did with the div, but I think extra.less is better practice
So you are giving it another class in the template
You may need to experiment with the width, it needs to be just wide enough to contain the icon and text
Ah, I thought the question was just about centering the text just of the bottom linkYou went further than me, but in his example there are borders for depth, and then we're not even accounting for style variant changes if on 2.3, as to why I left it simple.
Too vague to tell.Ah, I thought the question was just about centering the text just of the bottom link
menu-linkRow
would still (on the default style) create a background hover effect and a left border. It'd need to also be addressed to ignore those in your-class
too.We use essential cookies to make this site work, and optional cookies to enhance your experience.