Yu Shen
Yu Shen

Reputation: 2910

How to implement a window, or div, that can stay on top of any Chrome browser page, when invoked?

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

Upvotes: 1

Views: 756

Answers (1)

sje397
sje397

Reputation: 41822

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

#ontop {
    position: fixed;
    z-index:10000;
}​

Upvotes: 1

Related Questions