hellzone
hellzone

Reputation: 5236

JSF how to change alignment of link

Here is the html output of my view. The problem is text-decoration is working well but text-align is not working.

<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>

I also tried Css but it doesn't working.

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

Upvotes: 0

Views: 265

Answers (2)

Anusha Honey
Anusha Honey

Reputation: 917

Try using this

    <div class="aligndiv" style="text-align:center;">
        <a href="secure_logout" style="text-decoration: blink;text-align:center">Logout</a>
    </div>

Upvotes: 0

Bhojendra Rauniyar
Bhojendra Rauniyar

Reputation: 85545

Just add display: block; or display: inline-block; to your a then only it will be alligned to right.

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.

Upvotes: 3

Related Questions