Rearranging the Foundation Grid by incorporating smaller panels ahead of larger panels

I am in the process of designing a visually appealing webpage with no text other than captions.

To achieve the desired look, I aim to have each clickable box display in a unique size.

Here is the layout I envision:

__________________________
|                 |   2   |
|         1       |_______|
|                 |   3   |
|_________________|_______|
|_4_|_5_|        8        |
|_6_|_7_|_________________|

Currently, I have successfully designed boxes 1, 2, and 3. However, I am facing challenges with boxes 4, 5, 6, and 7. Due to their smaller sizes compared to box 8, they are displaying as follows, disrupting the flow, creating blank spaces, and extending the page beyond one screen:

|_4_|_5_|_6_|_7_|
|        8        |
|_________________|

How should I modify my code to ensure that the layout aligns with my vision?

Below is my current code, utilizing standard foundation framework:

<body class="blackbackground">
<div class="fixed" id="includeHeader"></div>
  <div class="fullwidth row collapse">
    <div class="large-8 medium-12 relative columns">
        <a href="#" class="darken"><img src="img/r3gamersHome.png"/>
            <div class="large-12 large-centered medium-12 medium-centered small-12 small-centered caption">
               <h2 class="brighten">Portfolio</h2>
            </div>
        </a>
    </div>
    <div class="large-4 medium-12 relative columns border">
         <a href="#" class="darken"><img src="img/r3gamersHome.png"/>
            <div class="large-12 large-centered medium-12 medium-centered small-12 small-centered caption">
                <h2 class="brighten">Contact</h2>
            </div>
         </a> 
    </div>
    <div class="large-4 medium-12 relative columns border">
         <a href="#" class="darken"><img src="img/r3gamersHome.png"/>
            <div class="large-12 large-centered medium-12 medium-centered small-12 small-centered caption">
                <h2 class="brighten">r3gamers.com</h2>
            </div>
         </a> 
    </div>
  </div>

  <div class="fullwidth row collapse">
    <div class="large-8 medium-12 relative columns">
        <a href="#" class="darken"><img src="img/r3gamersHome.png"/>
            <div class="large-12 large-centered medium-12 medium-centered small-12 small-centered caption">
               <h2 class="brighten">Portfolio</h2>
            </div>
        </a>
    </div>
    <div class="large-4 medium-12 relative columns border">
         <a href="#" class="darken"><img src="img/r3gamersHome.png"/>
            <div class="large-12 large-centered medium-12 medium-centered small-12 small-centered caption">
                <h2 class="brighten">Contact</h2>
            </div>
         </a> 
    </div>
    <div class="large-4 medium-12 relative columns border">    
        <div class="fullwidth row collapse large-4">
            <div class="fullwidth row collapse large-4">
                <div class="large-6 medium-6 relative columns border">
                  <a href="#" class="darken"><img src="img/r3gamersHome.png"/>
                      <div class="large-12 large-centered medium-12 medium-centered small-12 small-centered caption">
                         <h2 class="brighten">About Me</h2>
                      </div>
                  </a>
                </div>
                <div class="large-6 medium-6 relative columns border">
                  <a href="#" class="darken"><img src="img/r3gamersHome.png"/>
                      <div class="large-12 large-centered medium-12 medium-centered small-12 small-centered caption">
                         <h2 class="brighten">About Me</h2>
                      </div>
                  </a>
                </div>
            </div>
            <div class="fullwidth row collapse large-4">
                <div class="large-6 medium-6 relative columns border">
                  <a href="#" class="darken"><img src="img/r3gamersHome.png"/>
                      <div class="large-12 large-centered medium-12 medium-centered small-12 small-centered caption">
                         <h2 class="brighten">About Me</h2>
                      </div>
                  </a>
                </div>
                <div class="large-6 medium-6 relative columns border">
                  <a href="#" class="darken"><img src="img/r3gamersHome.png"/>
                      <div class="large-12 large-centered medium-12 medium-centered small-12 small-centered caption">
                         <h2 class="brighten">About Me</h2>
                      </div>
                  </a>
                </div>
            </div>
        </div>
    </div>
  </div>




<script src="js/vendor/jquery.js"></script>
<script src="js/foundation.min.js"></script>
<script>
  $(document).foundation();
</script>

Answer №1

After troubleshooting, I finally discovered the solution to my issue with a helpful document. The problem stemmed from not properly splitting a 4-row section into two separate rows, causing elements to be misplaced on the webpage. The corrected code is provided below, along with a link to the webpage that guided me towards the correct answer. (It would be beneficial for this lesson to be included in the documentation).

  <body class="blackbackground">
<div class="fixed" id="includeHeader"></div>
  <div class="fullwidth row collapse">

    <!-- Code snippet adjusted here -->

  </div>;

  <div class="fullwidth row collapse">

    <!-- More adjusted code goes here-->

  </div>;      

<script src="js/vendor/jquery.js"></script>
<script src="js/foundation.min.js"></script>
<script>
  $(document).foundation();
</script>

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

Ensure advertisements are easily accessible and not visible to screen-reading tools

I oversee the management of numerous ads on a website. My goal is to enhance their accessibility, and though I have been doing research, there seems to be limited information available on how to achieve this effectively. While I continue my investigation, ...

Combining input elements and captchas in one line within Bootstrap

I am currently working on a form group that includes a label, a captcha image, and an input field for the captcha code. My goal is to have the label positioned at the top of the form group, with the captcha image and input field aligned in one line. I have ...

Only apply the CSS rule to all pages except for one

I'm a beginner when it comes to css. In my wordpress website editor (Onetone theme), I added the following rule to my 'custom css field': html, body {margin: 0; height: 100%; overflow: hidden} It's working well...the scrollbar is gone ...

Trouble Viewing Image File

I am facing an issue where I cannot upload an image file from my computer onto my HTML file, as it is not showing up in the browser. However, when I link an image file from the web, it works perfectly fine. I have double-checked the file path and ensured ...

Creating a stylish CSS shadow effect for a collection of elements

In my Ionic2 project, I have an <ion-list> consisting of various items. Currently, these items are plain, but I desire to add some styling such that each item in the list displays a subtle shadow effect, similar to the one shown in the first image of ...

Click on the div to automatically insert its text into the textarea

I am looking for a way to enable users to edit their posts easily. My idea is to have them click on a link, which will then hide the original div containing their post and reveal a new div with the old text inside a textarea for editing. Despite searching ...

Troubleshooting issue with changing class based on input values

It appears that there is an issue with the functionality when switching values on page load. Initially, I was able to make it work for a single switch, but now that there are multiple switches on the page, toggling affects all of them. How can I modify it ...

Lining Up Radio Buttons Horizontally Using CSS: Alignment Issues in Mozilla and Chrome

I have recently started learning CSS and am facing an issue with the alignment of radio buttons. They do not align properly in Chrome and Firefox, although they display correctly in Explorer. Any assistance on this matter would be greatly appreciated. Th ...

What is the best way to create a text input that is both secure and non-editable?

While I am aware of the <input type="text" readonly /> possibility, it is not entirely secure. For example, if there is an input field that must remain uneditable by users, making it "readonly" can still be bypassed by inspecting the code and remov ...

Styling using CSS is effective only when applied locally, as it does not function properly on GitHub Pages

Although I have come across similar questions to the one I am facing, none of the solutions provided seem to work for me at the moment. My CSS file loads and functions as expected when tested locally, but once I upload it to GitHub, it stops working. In my ...

Adding an image to an HTML <span> element using the class attribute "

I need help adding an image to my HTML code. For example, how can I specify which image should be displayed in place of the placeholders? Thank you for your assistance! ...

Start CSS3 Animation Automatically

I am working on a multi-page website with a slider that includes a CSS3 animation featuring the famous rocket animation. Here is the code snippet I used: #outerspace { position: relative; height: 400px; background: #fff; color: #fff; } di ...

I'm struggling to incorporate the JQuery slideDown function into my code. Can someone lend a hand?

Why isn't the video div sliding down and displaying properly in the beginning? Any ideas on how to fix it? Here is the snippet of HTML code and JavaScript: <!DOCTYPE HTML> <html> <head> <title>Team Songs</title> <link ...

Adjusting the height dynamically of the final div to accommodate various screen resolutions using Angular 8

I am currently developing an enterprise application with Angular, featuring a Sidebar on the left and content on the right. The content container includes text at the top and dynamic elements like tables that need to be displayed below it. To achieve this ...

Can we arrange the divs in a vertical stack instead of horizontally?

Similar Inquiries: How to arrange divs from top to bottom in CSS How to order div stack first vertically then horizontally? When floating or using inline elements, they usually stack like this: ----------------- | 1 | 2 | 3 | 4 | | 5 | 6 | 7 | 8 ...

Utilizing jQuery's Chained Selectors: Implementing Selectors on Previously Filtered Elements

DO NOT MISS: http://jsfiddle.net/gulcoza/9cVFT/1/ LATEST FIDDLE: http://jsfiddle.net/gulcoza/9cVFT/4/ All the code can be found in the above fiddle, but I will also explain it here: HTML <ul> <li id="e1">1</li> <li id="e2" ...

A guide on utilizing a dropdown menu in PHP to showcase various MySQL tables

I am looking for a solution to display different tables (table 1 to 5) from my MySQL database when selected from a drop-down list. However, when I attempted to execute the code below, I did not receive any response and no data was loaded from the SQL datab ...

jQuery Ajax form submission encountering issues

I created a form dynamically with the help of jQuery. Here is the code: <form id="editorform" accept-charset="utf-8" method="post" name="editorform" action="menuupdate"> <div> <input id="updateItem" type="submit" value="Update"& ...

Tips on how to position a expanding textarea in line with buttons

I need assistance with aligning a textarea that is growing to the left, and action buttons positioned on the right side of the textarea. My goal is to have the action buttons aligned at the bottom, level with the expanding text area. Here is the code snip ...

The process involves transferring information from a specific div element to a database. This particular div element obtains its data after receiving an appended ID

It's a bit complicated, but I'm working on creating a tag system. I'm fetching data from a database with an AJAX call using the "@" symbol. Everything is working fine - the tags are being generated, but I'm having trouble retrieving and ...