`Can you guide me on the proper path for designing this website layout?`

As I embark on creating my first website, I have a specific vision in mind. I want the full display on a computer screen to show all the information and links without any need for scrolling. However, when the window is resized to smaller screens, I would like it to become scrollable with the footer positioned at the bottom of the page. The following images illustrate my idea:

Mobile version

Laptop version

While I have been able to create a responsive design that resizes correctly, I am facing issues with the footer not displaying properly in the laptop version. Despite enjoying problem-solving, I am currently stuck on finding an effective solution to this issue. I came across a website that accomplishes what I am aiming for, however, the code seems to be from a webservice making it impossible for me to decipher: petermckinnon.com

If anyone has suggestions on what framework I should use to achieve this layout, I would greatly appreciate some guidance.

Answer №1

To better assist you, I would need to see the code causing the issue. It sounds like it may be related to positioning. However, I have created a layout example for the desktop site. I enclosed everything in one container with a height of 100vh and positioned the footer at the bottom using

.footer{position:absolute;bottom:0;}
. Additionally, I utilized media queries to ensure responsiveness.

Here is the layout example (best viewed in full page):

html,
body {
  margin: 0;
}

.fullpage {
  height: 100vh;
  overflow-y: hidden;
}

.pic-wrap {
  float: right;
  width: 50%;
  object-fit: cover;
  height: 100vh;
}

.pic-wrap img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.content {
  float: left;
  width: 50%;
  background-color: #00ffff;
  height: 85vh;
}

.footer {
  background-color: orange;
  height: 15vh;
  position: absolute;
  bottom: 0;
  width: 50%
}

@media only screen and (max-width: 720px) {
  .fullpage {
    height: auto;
    overflow-y: visible;
  }
  .pic-wrap {
    display: inline-block;
    width: 100%;
    height: 50vh;
  }
  .content {
    float: none;
    display: inline-block;
    width: 100%;
    height: auto;
  }
  .footer {
    height: 15vh;
    position: relative;
    bottom: 0;
    width: 100%
  }
}
<div class="fullpage">


  <div class="pic-wrap">
    <img src="https://www.gettyimages.com/gi-resources/images/RoyaltyFree/Apr17Update/ColourSurge1.jpg" alt="" />
  </div>
  <div class="content">
    Content Here<br> Content Here<br> Content Here<br> Content Here<br> Content Here<br> Content Here<br> Content Here<br> Content Here<br> Content Here<br> Content Here<br> Content Here<br> Content Here<br> Content Here<br> Content Here<br>    Content Here<br>
  </div>
  <div class="footer">
    Footer
  </div>


</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Setting a maximum character limit for an HTML textarea

I am currently attempting to limit the maximum number of characters allowed in a textarea. Using: <textarea rows="4" cols="50" maxlength="50"> It is functioning correctly in Firefox, but there is no impact in IE. This is an issue as many website u ...

Connecting event listeners to offspring elements, the main element, and the entire document

My request is as follows: I have multiple boxes displayed on a webpage, each containing clickable divs and text. When a user clicks on a clickable div, an alert should appear confirming the click. Clicking on the text itself should not trigger any action. ...

Troubleshooting Vue.js nested v-for with <tr> tag problem

Why does Vue complain about undefined properties when I try nesting a <tr> inside a <tr> with a v-for binding on each? <table> <thead></thead> <tbody> <tr v-for="item in items"> <td>{{ item.nam ...

What is the best way to set a div's size to a constant value?

I recently designed a webpage that includes a feature where clicking a button adjusts the font size within the div. Within the div, there is a ul containing the buttons. However, when the font size changes, the div expands and the nav buttons also shift a ...

After clearing the option, the onChange function stops functioning

I'm facing an issue with the following code: success: function (data) { $('#' + idDivRefresh).endLoading(); if (data.message != '@Geral.Sucesso') { $('#' + idDropDown + ...

Establishing a class for wp_nav_menu

Is there a way to transform the following code: <ul class="ulStyle"> <li class="liStyle"> <div class="first"> <div class="second"> menu1 </div> </div> </li> </ul> into wp_nav_menu? I'm struggling with ...

Updating React JSX class based on certain conditions without manipulating the actual DOM

When working with jsx react, I am looking to dynamically set a class while keeping another class static. Here is an example of what I would like to achieve: maintaining the type class and having an additional dynamic class change change to either big, smal ...

How can I incorporate dynamic moving lines into my website's loading sequence?

Link to Gyazo image 1: https://gyazo.com/015425f0decb187e28b620c1e3206391 Issue with first image: https://gyazo.com/dfcd33e8a4fd5bea64e51fe40556f0bf I'm currently working on a website and came up with a cool concept of having two lines crossing the s ...

Analyzing Selenium Page Source

Hey there, I've been trying to obtain the full HTML code of my Gmail account page, but have been facing issues with getting it to work properly. Here's what I'm currently getting: I tried copying these codes and pasting them into a notepad, ...

Is it possible to modify the button icon on hover by utilizing chakra-ui and vanilla-extract?

My stack includes nextjs13, chakra-ui, and vanilla-extract Seeking guidance on how to update both icon and text within a button upon hover, utilizing chakra-ui and vanilla-extract. The current setup of my button is as follows: <Button > <svg wi ...

Third Party Embedded Video requiring SSL Certificate

I am currently facing an issue where I am trying to embed videos from a website that does not have an SSL certificate. This is causing my own website to appear insecure when the page with the embedded video loads, despite the fact that my website has its ...

Unique option preservation on customized HTML select menus - Maintain original selection

Currently, I am attempting to replicate a custom HTML select based on the example provided by W3 Schools. You can view the demo through this link: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_custom_select The issue I am encountering is that ...

Divide Footer Information into Two Sections: Left and Right

<footer> <div class="copyrights-left"> <p>&copy 2015. <a style="color: #fff;" href="index.html">Free Xbox Live Gold Membership and Free Xbox Live Gold Codes</a>. All rights reserved.</p></div> <div class="co ...

An unusual outcome occurred while attempting to duplicate the text

After copying the letter A, I noticed that an empty string is being logged to the console instead of the expected A. However, when I paste, the console does successfully log the letter A. document.addEventListener('copy', handler); document ...

Is dividing a container into equal sections possible with flexbox?

Is there a way to create an HTML/CSS structure that divides a fixed-size container into three sections horizontally? The first section should expand based on its content, while the remaining two sections should evenly split the leftover space, with scrollb ...

What is the best way to ensure that a div containing lengthy text wraps to the next line as if it were only text overflow?

Is there a way to make a div or span within another div act as text, causing overflow to shift to the next line? I'm unsure of which CSS properties would achieve this effect. I've attempted using overflow-wrap: break-word; word-break: break-al ...

Create a dynamic webpage where two div elements glide in opposite directions

My apologies for this seemingly basic question, but I am wondering if anyone knows how to create an animation where a div moves up and down while scrolling, similar to the effect on this website: On that site, near the footer, there are 2 sections with 2 ...

Implementing automatic page breaks in Laravel using the mpdf libraryLet me know

I am attempting to automatically add a page break if the data exceeds 10. I am using mpdf in conjunction with Laravel and Vue. Below is my CSS code: <style> div.breakNow { page-break-inside:avoid; page-break-after:always; } </style> This is t ...

Activate a change or response when the input value in Javascript is altered

Currently, I am working on a small project using JQuery and facing an issue when trying to remove error classes from HTML elements. To handle the removal of the error classes, I am utilizing $('selector').on('input') event to target th ...

Easy-to-use form input ensuring a constant total of 100

Looking for a way to collect numerical values from users that total 100% on a dynamically generated form? I'm exploring the idea of using a script or algorithm to adjust text fields as values are changed, ensuring they always add up to 100%. However, ...