Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
XML
<div id="outer" style="position: relative; width: 50px; height: 80px; overflow: scroll;">

   <div id="inner" style="height: 100px; position: fixed; width: 96px;">documentation on

   </div>

</div>



content of inner visible over outer div.
Posted
Comments
So, what you need?
Mukeshlky4u 11-Jun-13 3:44am    
I need content of inner div not visible out side outer div
Ok... Please check my answer.

The problem is because the inner div width(96 px) is greater than the outer one(50px).

You can do either of the below things.

1. Increase the width of outer div.
2. Make overflow auto of outer div.

Demo[^]
 
Share this answer
 
Comments
Mukeshlky4u 12-Jun-13 4:54am    
I cant't increase width of outer div.I want the content of inner div hide by Outer div.
I can't get you. Did you check the Demo? Don't you need that?
Hello,

You need to set position: relative for inner div :

< div id="inner" style="height: 100px; position: relative; width: 96px;" >
 
Share this answer
 
Comments
Mukeshlky4u 12-Jun-13 4:55am    
I need inner div position fixed.
Member 9773317 12-Jun-13 6:05am    
can you please explain what scenario exactly u have so that we can help u better...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900