1
votes

OK, DUE TO BEING NEW I WASNT ALLOWED TO POST IMAGES, SO I HAVE ATTACHED LINKS INSTEAD. (images should be inline with this question)

Im writing a webpage and have a div containing some text (inline) an then an image. Now when one clicks on the image, a hidden div appears below with an input field. The input field in this div is automatically aligned to the left edge of the div. I want it aligned to the right of the div.

As pictures speak louder than words, see link below.

http://www.freeimagehosting.net/uploads/d827ecc330.png

Anyhow the closest I got to a solution was to apply direction: rtl to hidden div, but then my text in my input field also changes to rtl.

I just want the placing of the text field to be rtl, not the input.

I hope this isnt too confusing.

Im quite new to css but have searched arund a lot, and have yet to find a solution besides the depreciated align=right.

Any suggestions greatly appreciated.

1
This is a programming forum. Consider asking the question on doctype.com. - Dietrich Epp

1 Answers

5
votes
<div id="container" style="width:500px;">
  <div id="text" style="width:250px; float:left;">Text</div>
  <div id="image" style="width:250px; float:left;">Image</div>
  <div id="input" style="width:500px; float:left; text-align:right">Input</div>
</div>