`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

Using jQuery to combine a variable with the image source in order to replace the image attribute

I am trying to create a script that will display a greeting message to the user based on their local time. I found a script on Stack Overflow, but I am struggling with updating the image source. When I try to replace the image source, I encounter the follo ...

Tips for positioning a div to the left once the minimum width has been reached?

<div id="container"> <div id="subsSection"> <div class="leftSection">ss</div> <div class="rightSection">ss</div> </div> </div> (1) My goal is to have the subsection div centered on the ...

Instantly reveal menu by pressing button

Is there a way to make my mobile menu open immediately upon touching the button? I have used ontouchstart="" in both buttons to create an overlay on the content when the offcanvas menu is visible. This functions well as soon as the user touches either butt ...

Ways to monitor and measure clicks effectively

Within my website, I have a table element with one column and numerous rows. Each row serves as a hyperlink to an external shared drive. <tr><td ><a href="file://xxx">Staff1</a></td></tr> <tr ><td ><a h ...

Issue with Wordpress css rendering on Internet Explorer

My webpage is functioning well in Chrome and Firefox, but I'm facing compatibility issues with Internet Explorer. I've identified several bugs related to tables and layout, however, I'm struggling to resolve the font and text-transform prob ...

Can you explain the meaning of the tag "&" ">" "*" in the context of useStyles functions?

After experimenting with React and Material-UI, I came across an interesting pattern in the code. When using the useStyle function, developers often create a class called 'root' and utilize the tag & > *. I tried to research the meaning be ...

Ways to extract information from PayFast

One issue I'm facing with my online store is that although PayFast does call my notify_url, it appears that no data is being posted. Below are the codes I've been using: Code for purchasing: <button id="cCart" type="submit" class="bt ...

What is the best way to dynamically duplicate the Bootstrap multi-select feature?

$(function() { $('#days').multiselect({ includeSelectAllOption: true }); $('#btnSelected').click(function() { var selected = $("#days option:selected"); var message = ""; selected.each(function() { message ...

PHP: Locate a class within an HTML element using a regular expression

I have a question about customizing my HTML ul menu with submenus. Specifically, I am looking to dynamically add a "first-item" class to the first item within the submenu using PHP. <ul id="menu-main" class="menu"> <li id="menu-item-68" class=" ...

Guidelines for aligning a form in the middle of the screen (positioned between the navigation bar and footer

Before asking this question, I made sure it's not a duplicate by researching previous similar issues with no success. I'm currently utilizing Bootstrap 4. You can view my app at (I'm unable to post the CSS and HTML of my React app due to S ...

The process of making an image fill an entire div using Html and CSS

What is the best way to make an image fill an entire div using Html and CSS? ...

Guide on making a prev/next | first/last button functional in list.js pagination

Is there a way to enhance my paginated index by adding prev/next, first/last buttons? I am curious if anyone has implemented these features using List.js. <script src='//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js&ap ...

Using HTML to position multiple lines of text alongside an image

I have multiple lines of content and hyperlinks. Additionally, there is an image included. I am looking to have the text aligned on the left with the image on the far right, positioned next to the text. While I attempted to use flexblocks to center everyt ...

Simple JavaScript numeric input field

Hey there, I'm a beginner learning JavaScript. I'm currently working on creating a program that adds numbers input through text fields. If you want to check out the HTML code, visit this link on JS Fiddle: http://jsfiddle.net/fCXMt/ My questio ...

Show the user's username on their profile page by retrieving the name from the database

Upon successful login/signup with various services, I want to display the username on the profile page. However, my database stores user data in different fields depending on the service used - user.twitter.name for Twitter logins, user.google.name for Goo ...

Retrieve the border color using Selenium WebDriver

Hey everyone, I'm currently trying to retrieve the border color of an extjs 4.2 form control text field using the getCssValue method. However, I'm having trouble getting the value as it's coming back blank. Below is a sample of my code that ...

Display a JSON object on a web browser

I am trying to display a JSON object on a web browser using HTML. The object is already in a text file and has been properly formatted for readability. My goal is to maintain the same formatting when displaying it on the browser. ...

What are the steps to achieve such a design?

Can you show me how to create a single layout using HTML and CSS? I am struggling with splitting the screen properly. Could you provide a simple example, maybe on jsfiddle? https://i.stack.imgur.com/d2rbn.jpg Thank you in advance! EDIT: I have added a ...

The website code lacks a dynamically generated <div> element

When using jQuery to dynamically add content to a "div" element, the content is visible in the DOM but not in the view page source. For example: <div id="pdf"></div> $("#btn").click(function(){ $("#pdf").html("ffff"); }); How can I ensur ...

Card with multiple links and tab-stopping

I'm trying to figure out the best way to navigate through a series of project information cards that include links to a live demo and Github Repo without overwhelming visually impaired users with excessive tab stops. I want the navigation to be seamle ...