Question: I'm trying to create a responsive web page. I have a header div that's 60px, and a landing div right below it that I want to take up the rest of the screen (height 100%). [However, it overflows.](https://i.stack.imgur.com/KPWrh.png) I can't use overflow:hidden because when I zoom in, [I can't scroll down anymore.](https://i.stack.imgur.com/FQY0Q.png) 

```
**************CSS***************

#home{
    margin: 0;
    height: 100%;
    min-height: 100%;
    width: 100%;
}

.header  {  
    width: 100%;   
    height: 60px;       
    background-color: none;   
}  

.landing{
    margin: 0 auto; 
    height: auto;
    min-height: 100%;
    width: 100%;  
    background-color: yellow;
}

*************HTML*************

<div id="home">
    <div class="header"></div>
    <div class="landing"></div>
</div>

```

How do I fix this so that my landing page doesn't overflow?

Answer: 
This worked with your sample data.

```
DECLARE @MinDate DATETIME = '5/8/2017 12:00AM';
DECLARE @MaxDate DATETIME = '5/8/2017 11:59PM';

WITH cam1 AS ( 
    SELECT TransDetailID,AVClassID
    FROM AVTransDetail
    WHERE CreatedDate BETWEEN @MinDate AND @MaxDate
    AND
    CamID = 1),

cam2 AS (
    SELECT TransDetailID,AVClassID
    FROM AVTransDetail
    WHERE CreatedDate BETWEEN @MinDate AND @MaxDate
    AND
    CamID = 2)

SELECT COUNT(*)'Total',SUM(CASE WHEN c1.AVClassID = c2.AVClassID THEN 0 ELSE 1 END)'NonMatch',
       SUM(CASE WHEN c1.AVClassID = c2.AVClassID THEN 0 ELSE 1 END) * 100.00/COUNT(*)'Percentage'
FROM cam1 c1
     JOIN cam2 c2 ON c1.TransDetailID=c2.TransDetailID

```
Try the below SQL script. 

First we LAG to find the differences. Then, we get each transaction and whether there is a difference. And finally, we get the percentage.

```
DECLARE @MinDate DATE = '2017/04/06',
        @MaxDate DATE = '2017/05/09';

SELECT count(*) AS TotalTransactions
    ,sum(Change) AS TransactionsWithChange
    ,(cast(sum(Change) AS FLOAT) / cast(count(*) AS FLOAT)) AS ChangePercent
FROM (
    SELECT TransDetailID
        ,MAX(classChange) AS Change
    FROM (
        SELECT *
            ,LAG(AVClassID, 1, AVClassID) OVER (
                PARTITION BY TransDetailID ORDER BY AVDetailID
                ) AS PrevClassId
            ,CASE 
                WHEN LAG(AVClassID, 1, AVClassID) OVER (
                        PARTITION BY TransDetailID ORDER BY AVDetailID
                        ) != AVClassID
                    THEN 1
                ELSE 0
                END AS ClassChange
        FROM AVTransDetail
        where CreatedDate between @MinDate and @MaxDate
        ) AS CoreData
    GROUP BY TransDetailID
    ) AS ChangeData

```

Hope this helps.