I have a positioned div whose content can be too long so scrollbars appear (overflow:auto set). It functions as a dialog box in an ajax app. I want to fix a clo
overflow:auto
If your close button is going to be text, this works very well for me:
#close { position: fixed; width: 70%; /* the width of the parent */ text-align: right; } #close span { cursor: pointer; }
Then your HTML can just be:
HTML
X