Matthew
Matthew

Reputation: 21

jQuery UI dialog box - positioning

This may be due to my ignorance but when using jQuery UI dialog boxes, how do I ensure that the dialog box moves in relation to the way the browser gets scrolled horizontally and vertically. We have an application that has a lot of horizontal text boxes on it and to see them all, a user would have to scroll horizontally. If no scrolling occurs, the inital textbox is displayed fine but if you scroll the browser horizontally, the dialog box is off its desired location by that same amount of horizontal scrolling. Do I need to set some relative window positioning for the UI dialog and if so, how would I do this?

Thank you, M

Upvotes: 2

Views: 904

Answers (1)

Trufa
Trufa

Reputation: 40717

Does this help? Is it what you are looking for?

<html>
<head>
<title>TextArea Position Handling Test</title>
</head>
<body>
<center>
  <textarea style="position: relative"> Insert Text</textarea>
</center>
</body>
</html>

EDIT:

Please read this tutorial:

http://www.dailycoding.com/Posts/creating_always_visible_div_using_css.aspx

Is this what you are looking for?

EDIT 2:

Is this roughly what you needed?

http://css-tricks.com/examples/ScrollingSidebar/

Upvotes: 1

Related Questions