I have two divs one being a child to anoth开发者_高级运维er. I wish my parent div which extends throughout the page to scroll. But the text upon it to remain fix from the top. Here is the sample image :- I want the background image of the background to be gray and that parent div will extend to the end of the page. The text present is on another div. I want this text to be always at the same position from the top of the screen. This actually acts as navigation for my website.
How can this be done ??
this could be what you are looking for
#nav {position:fixed; top: 30px;}
(no support for ie6)
精彩评论