The background of the <aside>
on my website has a grey background. When I access the site from a mobile device and press the menu button, the menu background displays fine, but when I scroll down the page the background only partly refreshes, leaving transparency for roughly the lower half of the aside.
Note: The site uses bigcartel, so the code I am editing does not match up exactly with the code read from the live site.
I followed Praveen's instruction left in the comments:
Remove the
height: 100%
fromaside {}
Line no. 757 in theme.css
The result is that the page stopped attempting to refresh the background, and the area it filled remained fixed as the page was scrolled.
Here is the CSS for the <aside>
.
aside {
background-color: {{ theme.sidebar_color }};
float: left;
padding: 57px 30px 0;
position: {% if theme.fixed_sidebar %} fixed {% else %} absolute {% endif %};
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-o-transform: translateZ(0);
transform: translateZ(0);
width: 209px;
z-index: 100;
}
@media screen and (max-width: 765px) {
aside {
border-right-color: {{ theme.sidebar_border_color }};
border-right-style: solid;
border-right-width: 1px;
min-height: 100%;
padding: 0 32px;
position: absolute;
width: 272px;
z-index: 1;
}
}
This was existing CSS in the template. The following is an additional class which I added to the end of the stylesheet:
aside {
-webkit-box-shadow: 0 0 24px 3px rgba(255,255,255,0.6), inset -7px 9px 20px -7px rgba(0,0,0,1);
-moz-box-shadow: 0 0 24px 3px rgba(255,255,255,0.6), inset -7px 9px 20px -7px rgba(0,0,0,1);
box-shadow: 0 0 24px 3px rgba(255,255,255,0.6), inset -7px 9px 20px -7px rgba(0,0,0,1);
}
I have added a screenshot showing the updated result.
EDIT:
I tried the solution recommended by Praveen in the comments. However, removing height: 100%;
from the <aside>
container did not provide a solution.
The background colour would fill the area which was originally visible on the site when the page loaded but, when scrolling, the background colour would not re-appear and the page did not attempt to refresh it so the portion of the container which loaded off-screen was transparent.
I then tried replacing height: 100%
with min-height: 100%
and it appears to have worked. Now, when I scroll down the page on a mobile site, the background colour is filled seamlessly except where the page height exceeds <html>
.
EDIT:
I have cleaned up the code. Attempted to push <cite>
to the bottom. Attempted altering margins and padding of containers. Attempted to alter margins and padding of cite in order to force <aside>
to extend to the bottom of the page. Some results succeed when viewing from a narrow browser, but I am unable to find any solution which succeeds when viewing from a mobile device. I have been testing using an Alcatel One Touch Pop as well as Chrome's mobile viewer. None of these display properly in portrait, however landscape view shows no error.