Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The requirement is when window size reduces (in.responsive design less than 800px) the right column(div) need to come at the top, then middle column and at the bottom left column.
This is almost working.

The Problem I am facing is:
for smaller window the Scroll is appearing at the bottom of browser.
But we want the scroll should only be for the middle(red) area.

How can we achive this.

Html and Css are given at the bottom.


XML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .left{width:20%; float:left}
        .midle{width:60%; float:left}
        .right{width:20%; float:left}

        @media (max-width: 800px) {
        #tbl {display: table;  width:100%; border:0px; margin:0px  }
        #Header {display: table-header-group; }
        #footer {display: table-footer-group; }
        #tblBody {display: table-row-group;    }

        .left{width:100%; float:none!important}
        .midle{width:100%; float:none!important}
        .right{width:100%; float:none!important}
         }

    </style>
</head>
<body style="border:0px; margin:0px" >
    <form id="form1" runat="server">
    <div id="tbl" style="width:100%">
        <div class="left" id="footer" style=" background-color:Yellow; overflow:hidden">Left</div>
        <div class="midle" id="tblBody" style="background-color:Red; overflow:auto" >Middle
                <div style="width:1200px">
                    Abc12--------------------------------------------Abc3--------------------------------------------Abc4--------------------------------------------Abc5
                </div>
        </div>

        <div class="right" id="Header" style="background-color:Green; overflow:hidden">Right-</div>
     </div>
    </form>
</body>
</html>
Posted

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