how to create a fixed floating button on top right of textarea

I want to write something like the following:

|------------------------------------------------------|</br>
|td                                                    |
| |--------------------------------------------------| |
| |textarea                          floating button | |
| |                                                  | |
| |                                                  | |
| |                                                  | |
| |                                                  | |
| |                                                  | |
| |--------------------------------------------------| |
|------------------------------------------------------|  

the outter is td element, and textarea is inside. I want a fixed floating button on the right top corner of textarea, or td. And this textarea and td is behind of this floating button. I tried to use z-index to do that, but didn't work.

Also the button is a dropdown menu.

Can someone tell me how to implement this?

Thanks

Answers


You'll be able to do this by giving the outer container position: relative; and then the inner elements:

position: absolute; top: 0px; right: 0px;

You can then 'layer' them with z-index.

Just because I lost out on 6 points by not including a JSFiddle - here's a demo - http://jsfiddle.net/spacebeers/WYrwf/


Need Your Help

Point `jdee-server-dir' to dir with JDEE jars issue

emacs jdee

I am using Emacs with JDEE. When I want to compile the current Java file with C-c C-v C-c key binding, I encounter this message and don't compile:

Hibernate char discriminator value

hibernate jpa hibernate-mapping hibernate-annotations

Why does hibernate think that char discriminators are not safe?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.