Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i wanted to make a table row position fixed.
then how can it be possible?
i have tried like this


If i use above code then my parent table 2nd td content overlapping the
div content, how can i avoid overlapping div content?



This td content overlapping the above td content
Posted
Comments
Madhav Hatwalne 12-Oct-11 3:24am    
where is the code?
amit_83 12-Oct-11 3:32am    
<table>
<tr>
<td>
<div style="position:fixed;">
<table> want to make moveable if scrollabar move</table>
</div>
</td>
</tr>
<td>This td content overlapping the above td content</td>
<tr>
</tr>

try this

XML
<table>
            <tr>
                <td>
                    <div style="position: absolute;">
                        <table>
                            <tr>
                                <td>
                                    want to make moveable if scrollabar move
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    This td content overlapping the above td content
                </td>
            </tr>
        </table>



still if you are not getting with this code reply me i will get back to you
 
Share this answer
 
v2
Comments
amit_83 12-Oct-11 5:14am    
i have written same code as you suggest. but this code does'nt work.
div content is moving with scrollbar, but div content is overlapping
by below td.
hitech_s 12-Oct-11 5:52am    
check once i modify my solution

changed the style property
amit_83 12-Oct-11 6:16am    
can you provide me code?
i can't change style property if i will remove style="position: absolute;" property then. div content will not move with scroll.
hitech_s 12-Oct-11 6:23am    
in which way u want to scroll the div?

plz post your code and be clear..plz
Try this
HTML
<table style="removed: fixed;">
            <tr>
                <td>
                    <div>
                        <table>
                            <tr>
                                <td>
                                    want to make moveable if scrollabar move
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    This td content overlapping the above td content
                </td>
            </tr>
        </table>
 
Share this answer
 
v4
Comments
amit_83 12-Oct-11 6:19am    
Thanks for reply.
i want to make div content moveable, if page scroll move then i want the div content to move with scroll.
moving is working if i scroll the page
But below td content ovelapping the first div content.
XML
i have found the solution.

<div style="min-height: 70px;">
    <table style="position: fixed;z-index:1;">
      <tr>
        <td style="min-width: 300px;">
        </td>
      </tr>
    </table>
<div>
<div style="width: 99%; min-width: 800px;">
    <table>
      <tr>
        <td style="min-width: 100px;">
        </td>
        <td style="min-width: 700px;">
        </td>
      </tr>
     </table>
 </div>
.
 
Share this answer
 

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



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