Question: I am trying to combine 2 big SQL queries into one datatable, so I can load it on the webpage.

Query #1:

```
select
    isnull(SALES_NUM4, '') SalesNo, 
    count(CUS_ID) NumOfCust, 
    count(distinct sales_num) NumOfRep
from 
    (select 
         SALES_NUM4, CUS_ID, SLS_TYPE, SALES_NUM 
     from customer

     union

     select 
         SALES_NUM4, CUS_ID, SLS_TYPE, SALES_NUM 
     from omsdata7.dbo.customer) a
where 
    SALES_NUM4 != '' and SLS_TYPE = '1'
group by 
    SALES_NUM4
order by 
    SALES_NUM4

```

Query #2:

```
select 
    isnull(SALES_NUM4, '') SalesNo, 
    count(ORD_NUM) MTD_Ord, 
    convert(decimal(10, 2), sum(ORD_AMT)) MTD_Amt
from 
    (select 
         SALES_NUM4, ORD_DT, ORD_NUM, ORD_AMT 
     from orders

     union

     select 
         SALES_NUM4, ORD_DT, ORD_NUM, ORD_AMT 
     from omsdata7.dbo.orders) a
where 
    DATEADD(day, ORD_DT-4, '1801-01-01') >= DATEADD(m, DATEDIFF(m, 0, GETDATE()), 0)
    and DATEADD(day, ORD_DT-4, '1801-01-01') < getdate()
    and SALES_NUM4 != ''
group by 
    SALES_NUM4
order by 
    SALES_NUM4

```

Answer: 
Use `vw` instead of `%`. 1vh equals to 1% of browsers viewport.

```
#footer {
    background: #6B191C;
    position: absolute;
    left: 0;
    height: 100px;
    width: 100vw;
    margin-top: 60px;
}

```

There are more relative lengths than just `vw`. There is:

* `vh` - Relative to 1% of the height of the viewport
* `vw` - Relative to 1% of the width of the viewport
* `vmin` - Relative to 1% of viewport's smaller dimension
* `vmax` - Relative to 1% of viewport's larger dimension

source: <https://developer.mozilla.org/en-US/docs/Web/CSS/length>
Remove `width` from your footer and add `right: 0;` instead. It will spread your footer from the left side to the right side. So your CSS will be this: 

```
#footer {
    background: #6B191C;
    position: absolute;
    left: 0;
    right: 0;
    height: 100px;
    margin-top: 60px;
}

```

Here is working example <http://codepen.io/anon/pen/MwRJqv>.