I went through all questions related to this title and applied many of the suggested solutions.The most informative ones were link1 link2 link3. None of them worked. When I resize my browser I can not see the outer elements. I just want to be able to display my website on other devices screen properly. For example, when I halve the width of the browser screen, I can not see the other half of the website.
Here is my code pieces:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
#homepage {
position: absolute;
width: 100%;
max-width: 1920px;
height: 4770px;
background-color: rgba(255,255,255,1);
overflow: hidden;
--web-view-name: Ging Games- Home;
--web-view-id: homepage;
--web-scale-on-resize: true;
--web-enable-deep-linking: true;
}
@media screen and (max-width: 780px) {
.homepage{
width: 100%;
position: absolute;
height: 4770px;
background-color: rgba(255,255,255,1);
overflow: hidden;
--web-view-name: Games- Home;
--web-view-id: homepage;
--web-scale-on-resize: true;
--web-enable-deep-linking: true;
}
}
@media screen and (max-width: 375px) {
.homepage {
width: 100%;
position: absolute;
height: 4770px;
background-color: rgba(255,255,255,1);
overflow: hidden;
--web-view-name: Games- Home;
--web-view-id: homepage;
--web-scale-on-resize: true;
--web-enable-deep-linking: true;
}
}
@media screen and (max-width: 320px) {
.homepage {
width: 100%;
position: absolute;
height: 4770px;
background-color: rgba(255,255,255,1);
overflow: hidden;
--web-view-name: Games- Home;
--web-view-id: homepage;
--web-scale-on-resize: true;
--web-enable-deep-linking: true;
}
}
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<script type="text/javascript" src="css3-mediaqueries.js"></script>
From other StackOverflow solutions-suggestions I have already applied:
- I used content="width=device-width at meta
- Media query order suggested starting bigger to a smaller size
- I used max-width, not the max-width-device as suggested
- Original homepage class is above the media query
- Gave reference to bootstrap
- My media query syntax is correct (many of the posts answers were related to space issues and not putting brackets or pixels etc.)
Additional information: I use this website to host my website.