Aligning contents of a div to right edge. 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 possible? Applying direction: right to div almost acheives effect, except text fields inputs also become rtl. (I guess align: right also works, but is depreciated)
views:
269answers:
1
+1
A:
<div style="direction: rtl;">
Text is right-aligned
<input type="text" value="Some value" style="direction: ltr;" />
</div>
St.Woland
2010-01-24 12:58:30
I know that but I have images and input field also.
2010-01-24 13:25:40
Check the updated answer. You may use *css* to apply styles to all elements.
St.Woland
2010-01-24 13:36:58
nice, but i think i tried this already and the outer rtl overrides the inner ltr. strange but true, i think.
2010-01-24 13:43:22
okay, text-align right seems to work, even for input fields had read that it wouldnt work. sorry
2010-01-24 22:55:39