The functionality of Foundation's 12 grid system is not functioning correctly

Check out the code snippet below:

<link href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/css/foundation.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"/>

<div class="content">
  <div class="row">
    <div class="left-frame large-3 medium-3 hide-for-small columns">
      <header class="icon-bar five-up" role="navigation">
        <a class="item"><i class="fa fa-info-circle"></i></a>
        <a class="item"><i class="fa fa-info-circle"></i></a>
        <a class="item"><i class="fa fa-info-circle"></i></a>
        <a class="item"><i class="fa fa-info-circle"></i></a>
        <a class="item"><i class="fa fa-info-circle"></i></a>
      </header>
      <div class="side-nav">
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
      </div>
      <footer class="pagination-centered">
        <ul class="pagination">
          <li class="arrow unavailable"><a href="#">&laquo;</a></li>
          <li><a href="#">1</a></li>
          <li><a href="#">2</a></li>
          <li><a href="#">3</a></li>
          <li><a href="#">4</a></li>
          <li><a href="#">5</a></li>
          <li class="arrow"><a href="#">&raquo;</a></li>
        </ul>
      </footer>
    </div>
    <div class="content large-9 medium-9 small-12 columns">
      <div class="row">
        <div class="large-3 medium-3 small-12 columns">q</div>
        <div class="large-6 medium-6 small-12 columns">q</div>
      </div>
      <div class="row">
        <div class="large-3 medium-3 small-12 columns">q</div>
        <div class="large-6 medium-6 small-12 columns">q</div>
      </div>
    </div>
  </div>
</div>

My goal is to have 3 to 9 grids on the page, but the second column is nesting inside the first. Here's an image for reference: https://i.sstatic.net/adrY8.png

Why is this happening? I specifically want the second column to be in its own place.

Possible Solutions Attempted

#1: Reduce the Second Column Size

I tried shrinking the second column to 8 grids, and it now works perfectly. It's odd though, as this makes the total grid count 11.


Environment Details

  • Foundation 5.5.3

Answer №1

The code functions properly in the CodePen example with your provided code. Possible conflicts may arise from custom code implementation.

<link href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/css/foundation.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"/>

<div class="content">
  <div class="row">
    <div class="left-frame large-3 medium-3 hide-for-small columns">
      <header class="icon-bar five-up" role="navigation">
        <a class="item"><i class="fa fa-info-circle"></i></a>
        <a class="item"><i class="fa fa-info-circle"></i></a>
        <a class="item"><i class="fa fa-info-circle"></i></a>
        <a class="item"><i class="fa fa-info-circle"></i></a>
        <a class="item"><i class="fa fa-info-circle"></i></a>
      </header>
      <div class="side-nav">
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
        <li><a href="#">q</a></li>
      </div>
      <footer class="pagination-centered">
        <ul class="pagination">
          <li class="arrow unavailable"><a href="#">&laquo;</a></li>
          <li><a href="#">1</a></li>
          <li><a href="#">2</a></li>
          <li><a href="#">3</a></li>
          <li><a href="#">4</a></li>
          <li><a href="#">5</a></li>
          <li class="arrow"><a href="#">&raquo;</a></li>
        </ul>
      </footer>
    </div>
    <div class="content large-9 medium-9 small-12 columns">
      <div class="row">
        <div class="large-3 medium-3 small-12 columns">q</div>
        <div class="large-6 medium-6 small-12 columns">q</div>
      </div>
      <div class="row">
        <div class="large-3 medium-3 small-12 columns">q</div>
        <div class="large-6 medium-6 small-12 columns">q</div>
      </div>
    </div>
  </div>
</div>

http://codepen.io/shoaibik/pen/KrmdOJ

Answer №2

I think the issue lies in the fact that columns should typically be enclosed within rows, but in your case you have column>row>column structure. To resolve this, try using the .hide-for-small-only class along with .hide-for-medium-up to achieve the desired outcome.

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

Checking for the Existence of a Database Table in HTML5 Local Storage

Upon each visit to my page, I automatically generate a few local database tables if they do not already exist. Subsequently, I retrieve records from the Actual Database and insert them into these newly created local tables. I am wondering if there is a me ...

The CSS styles for a:link, a:active, and a:visited do not seem to work with

My page contains the following CSS rule: a:link,a:active,a:visited{text-decoration:none;} I have encountered an issue where this rule is not working as expected. To apply the rule within a div with the id="test", I had to modify the rule like this: #tes ...

Adding a linear gradient with a fade effect to Highcharts sparkline chart: Step by step guide

I am working with a Highcharts sparkline chart, and the design in my Figma file resembles the image provided below. I would like to customize the chart by adding transparency and a linear-gradient effect. Can anyone provide guidance on how to achieve this? ...

CSS Techniques for Smooth Transitions

When the hamburger icon is pressed, a menu appears over the current page with CSS from Glamor. The menu slides in perfectly from the right side of the screen, but I am having trouble getting it to slide out when any part of the menu is clicked. I have def ...

Unsuccessful conversion of JSON data to HTML using json2html in Python

I have been experimenting with converting JSON data to HTML using json2html. The JSON data structure I am working with is as follows: json_obj = [{"Agent Status": "status1", "Last backup": "", "hostId": 1234567, "hostfqdn": "test1.example.com", "username" ...

How is it possible to retrieve the flex-direction property value of a div using JavaScript?

While attempting to troubleshoot this issue using Windows Chrome 59, I utilized devtools to examine the properties. let element = document.getElementById("divId"); Upon checking the value of the element, I noticed that the object structure displayed: &g ...

CSS photo display with magnification feature

I currently have a functioning inner-zoomable image set up with the code provided. I am interested in converting this setup into an image gallery with zoom capabilities for the selected image element, but I'm unsure where to start. My objective is to ...

The DIV element fails to encompass all of its content

There seems to be an issue with the only div element on my page. It's covering the middle of the page, but I managed to make it extend all the way down using CSS tweaks. However, there is a problem - the video inside the div is overflowing: Below is ...

Guide on invoking a JavaScript function within a jQuery upon a specific event, such as clicking a hyperlink

I have a website page where I display some important information. However, I want to make this text hidden initially and only visible when a user clicks on a specific link or button. I attempted to achieve this functionality using the following code snippe ...

jQuery cannot access a hidden CSS property

I'm working on a form for my new project and have assigned the same class to all input fields. In my CSS file, I've set the text to be capitalized and it displays correctly. However, when I use jQuery's .val() to get the value of the field, ...

Show the text from the chosen option using jQuery with a button

Hey everyone, I have a question regarding a coding issue I'm facing. In this problem, I am unable to display the text from the selected option when I click the order button. The desired result is to show the selected option that I choose and display i ...

Show a variety of logos on the website based on the current date

I've been experimenting with displaying a unique logo on my website based on the current date (for example, showing a Christmas-themed logo during December). Here's what I have so far: <img class="logo" id="global_logo" sty ...

HTML/CSS border tiling (left, bottom, right)

Is there a way to implement borders using images in CSS/HTML that does not involve CSS3? I am working with three border tiles: left, right, and bottom. I want them to repeat-x/y to the left, right, and bottom of my content container. I attempted to use d ...

Sketch a straight path starting from the coordinates x,y at a specified angle and length

Is there a way to draw a line in Javascript starting from a specific x/y position with a given length and angle, without having to define two separate points? I have the x/y origin, angle, and length available. The line should be placed on top of a regula ...

Dynamic background image changes when checkbox is selected

Greetings! I am a newcomer to the stackoverflow community and I am facing an issue with dynamically changing the background image of my webpage when a checkbox is checked. Here is the HTML code snippet: <ul> <li><label for="Lines">A ...

retrieving data from a dropdown selection

Help! I'm stuck and need guidance. Below is the code I've been working on, attempting to set a variable using a drop-down list. Despite trying everything I can think of, I still seem to be missing something simple. Any hints or nudges in the righ ...

Utilize HTML5 to send a document to Google Drive API

I'm currently developing a Google Chrome extension that utilizes the Google Drive API to upload files. While handling text files isn't an issue, I encounter errors when attempting to upload binary files. When trying to upload a file using the Fi ...

The React style background property for CSS styling

Is there a way to apply the css property background inline in react? I attempted to pass the following object without success: let style = { background: `linear-gradient( rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6) ...

What is the best way to use the cursor-pointer property in combination with a (click) event handler

<i class="cursor-pointer" (click)="sort()"></i> Our development team is grappling with numerous repetitive class definitions such as this one. I wanted to find a more efficient way to automatically add the cursor pointer style whenever a (clic ...

Mastering the Art of Utilizing $(this) in jQuery

$(".item_listing").hover(function(){ $(".overlay_items").display(); },function(){ $(".overlay_items").hide(); } ); This is my jQuery code. I am trying to display the "overlay_items" div when the "item_listing" div is hovered ov ...