gpt4 book ai didi

html - JSF如何更改链接的对齐方式

转载 作者:太空宇宙 更新时间:2023-11-03 23:55:50 24 4
gpt4 key购买 nike

这是我的 View 的 html 输出。问题是 text-decoration 运行良好,但 text-align 不起作用。

<div class="ui-layout-unit-content ui-widget-content" style="position: relative; height: 23px; visibility: visible;">
<a href="secure_logout" style="text-decoration: blink;text-align: right">Logout</a>
</div>

我也尝试过 Css,但它不起作用。

element.style {
color: #D20005;
font-weight: bold;
text-decoration: #D20005 !important;
text-align: right !important;
}

最佳答案

只需将 display: block;display: inline-block; 添加到你的 a 中,然后它才会被对齐到右边。

Because before applying the display properties its default value is inline and inline element cannot have the width and without width it can't be aligned.

关于html - JSF如何更改链接的对齐方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18712646/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com