Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

How to make my Fake OS website more responsive and make the elements maintain their size proportions as the window is resized?

$
0
0

I’ve searched quite a bit, but none of the other resources matched the specific CSS structure I have. No matter what I tried, my layout never became responsive. I’m very new to CSS and still learning by doing, so I’ve been getting a bit frustrated. I’d really appreciate some help understanding what’s going wrong. Here’s the code I’m working with:

* {  box-sizing: border-box;  margin: 0;  padding: 0;  font-family: "VT323", monospace;  user-select: none;}body {  min-height: 100vh;  display: grid;  grid-template-rows: 1fr auto;  overflow: hidden;}main {  background-color: #046467;  padding: 2rem;}footer {  display: flex;  justify-content: space-between;  background-color: #e1dfdf;  height: 7rem;}#start-button {  padding-inline: 5rem;  font-size: 3em;  color: black;  background-color: #e1dfdf;}.left-side,#date-time-section {  display: flex;}.left-side ul {  list-style: none;  display: flex;}.left-side ul li {  height: 100%;}.left-side ul li button {  font-size: 4rem;  padding: 1rem 5rem;  height: 100%;  background-color: #ff3375;}#start-menu {  position: fixed;  background-color: ghostwhite;  width: 750px;  height: 800px;  bottom: 110px;  left: 0;  border-top-right-radius: 15px;  z-index: 99999;}#date-time-section button {  padding: 1rem 3rem;  display: flex;  flex-direction: column;  justify-content: space-between;  gap: 1rem;  font-size: 1.5rem;  background-color: #e1dfdf;}.right-click-menu {  position: absolute;  z-index: 999999;}.right-click-menu ul {  list-style: none;  padding: 0.1rem;  background-color: #4b4f53;}.right-click-menu ul li button {  font-size: 2rem;  padding: 0.5rem 3rem 0.5rem 1rem;  width: 100%;  text-align: left;  border-bottom: #4b4f53 solid 1px;}.right-click-menu ul li button:hover {  background-color: #ff3375;  color: white;}#folder-name-prompt {  background-color: white;  width: fit-content;  display: flex;  justify-content: center;  z-index: 999;}#folder-name-input {  padding: 1rem;  font-size: 3rem;  background-color: #e1dfdf;}#accept-folder-name-input,#reject-folder-name-input {  font-size: 3rem;  padding: 1rem;  background-color: #e1dfdf;}.center-wrapper {  width: 100%;  height: 100%;  display: flex;  justify-content: center;  align-items: center;}.desktop-icon {  position: fixed;  display: flex;  width: 10rem;  padding: 1rem;  flex-direction: column;  align-items: center;  font-size: 2rem;  border-radius: 3px;}.desktop-icon p {  text-align: center;  white-space: nowrap;  overflow: hidden;  width: 90%;  text-overflow: ellipsis;}.desktop-icon:hover {  cursor: pointer;  background-color: rgba(47, 198, 205, 0.3);  border: 1px solid #046467;  z-index: 99999;}.desktop-icon:hover p {  white-space: normal;  word-break: break-word;  color: #000000;}.desktop-icon:active {  z-index: 99999;}.desktop-icon img {  width: 80%;}
<link rel="preconnect" href="https://fonts.googleapis.com" /><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /><link href="https://fonts.googleapis.com/css2?family=Bungee+Tint&family=Dancing+Script:wght@400..700&family=Exo:ital,wght@0,100..900;1,100..900&family=Jost:ital,wght@0,100..900;1,100..900&family=Pixelify+Sans:wght@400..700&family=VT323&family=Varela+Round&display=swap" rel="stylesheet" /><main><div class="center-wrapper"><div id="folder-name-prompt"><input id="folder-name-input" type="text" placeholder="Enter a folder name..." /><button id="accept-folder-name-input">✅</button><button id="reject-folder-name-input">❌</button></div></div><div class="right-click-menu"><ul><li><button class="create-folder-btn">Create Folder</button></li><li><button class="delete">Delete</button></li><li><button class="others">Others...</button></li></ul></div><div id="start-menu"><div>1</div><div>2</div></div></main><footer><div class="left-side"><button id="start-button">START</button><ul><li><button>app</button></li><li><button>app</button></li><li><button>app</button></li><li><button>app</button></li><li><button>app</button></li><li><button>app</button></li><li><button>app</button></li></ul></div><div id="date-time-section"><button><h2 id="taskbar-time"></h2><h2 id="taskbar-date"></h2></button></div></footer>

Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>