开发者

Aligning contents of a div right while keeping text direction in input fields going ltr

I am trying to aligning contents of a div to right edge, but I'm getting 'direction: rtl' effect (right to left), without specifying the width of the div? while keeping text direction in input fields going ltr (left to right). Is it possib开发者_JAVA技巧le?

Applying direction: right to div almost acheives effect, except text fields inputs also become rtl. (I guess align: right also works, but is depreciated)


<div style="direction: rtl;">
    Text is right-aligned
    <input type="text" value="Some value" style="direction: ltr;" />
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜