views:

26

answers:

1

I want to implement an extension in Chrome that I'd display some text related to the current page being viewed.

I have learned ways to code div to be part of an HTML page that is specifically designed to support such always on top popup (div), but I have no clue how to make a window/div or whatever text area to stay on top of any web page being browsed.

I'm pretty new to JavaScript, and Chrome extension development.

I'd appreciate if you could give me some pointer, or example.

Thanks in advance!

Yu

+1  A: 

I think you'll want to look at fixed positioning and z-index style attributes:

#ontop {
    position: fixed;
    z-index:10000;
}​
sje397
Thanks, it would work. However, I'd prefer to have a window to have the property of z-index, but it seems that it's not possible. I may need to add a div with z-index: 10000.
Yu Shen