The alignment of divs can be disrupted in a Nested Grid system

I am working with a 16 grid system where I have two 8 column divs positioned side by side. In one of the 8 column divs, I am trying to include a 5 column div on the left and two three columns divs stacked on top of each other on the right. I have tried various methods such as floating elements and clear fixes, but I can't seem to get it to work. The grid system I am using is Skeleton. Below is the current HTML & CSS code. Any assistance would be greatly appreciated!

<div class="container">
<article id="main">
<div class="eight columns">
      <section class="five columns bulletin alpha">
        <h2>Bulletin Board</h2>
          <p>Post 1</p>
      </section>
      <div class="clear"></div>
      <aside class="three columns take5 omega">
       <ul>
        <li><h3>Take 5</h3></li>
        <li><a href="#"><img src="http://placehold.it/75x75" alt="Learning Break icon"  /></a></li>
                <li><h3>Learning Break</h3></li>
              </ul>
        </aside>
      <aside class="three columns longTerm omega">
      <ul>
      <li><h3>Long Term</h3></li>
      <li><a href="#"><img src="http://placehold.it/75x75" alt="Long Term Learning icon" /></a></li>
      <li><h3>Learning</h3></li>
      </ul>
     </aside>
</div>

The CSS style applied is as follows:
.bulletin {
margin: 0;
padding: 0;
width: 100%;
float: left;
    }
.take5, .longTerm {
margin: 0;
width: 100%;
padding: 0;
float: right;
    }

Answer №1

The main issue causing your containers to not float alongside each other is the 100% width given to each of them. This compels the containers to occupy all the available horizontal space within their parent container, leading to stacking instead of floating next to each other.

To fix this, consider removing the width: 100% from your CSS or assigning a specific finite width instead, allowing the containers to float as intended.

Additionally, it seems there is a discrepancy in the number of columns you aim for versus what is actually being created. Make sure to address this inconsistency to avoid any confusion in your layout setup.

Check out this example on JSFiddle

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

Transferring data between pages using HTML5 and jQuery

I'm currently developing Windows Phone 8 apps using HTML5 and jQuery. My project involves two HTML pages - the first page consists of input boxes and a button, while the second page contains controls to display the data entered on the first page. Upon ...

Using JQuery toggleclass to add transitioning effects to a :after element

I'm using the toggleClass function to add the class .expend to a div with an ID of #menu, which increases the height of the menu from 100px to 200px with a smooth transition effect. I also have a pseudo-element #menu:after for aesthetic purposes. My ...

Exploring the functionalities of Ajax and HTML5 history states in relation to back button behavior

There have been numerous inquiries regarding the functionality of pushState in HTML5, but I'm encountering two specific issues for which I haven't found any solutions. My popstate handler is defined as follows: $(window).bind('popstate&apos ...

jQuery Form: Despite the Ajax response being visible on the page, it does not appear in the source code

Utilizing Jquery Form for an Ajax image upload. This is the relevant HTML code: <div class="input_con imageupload_con"> <form action="processupload.php" method="post" enctype="multipart/form-data" id="MyUploadForm"> < ...

TabContainer - streamline your selection process with inline tabs

I am currently working on a GUI that includes a TabContainer with two tabs, each containing a different datagrid. I initially created the tabcontainer divs and datagrids declaratively in HTML for simplicity, but I am open to changing this approach if it wo ...

Tips for handling null input values when saving to a database

<!DOCTYPE html> <html> <head> <title>Data</title> </head> <body> /* Enter your data here */ <form action="this.php" method="post"> <input type='text&a ...

A dynamic image carousel featuring multiple images can be enhanced with fluid movement upon a flick of

I am trying to enhance this image slider in HTML and CSS to achieve the following objectives: 1. Eliminate the scroll bar 2. Implement swipe functionality with mouse flick (should work on mobile devices as well) 3. Make the images clickable .slider{ ove ...

Circular arrangement using D3 Circle Pack Layout in a horizontal orientation

I'm currently experimenting with creating a wordcloud using the D3 pack layout in a horizontal format. Instead of restricting the width, I am limiting the height for my layout. The pack layout automatically arranges the circles with the largest one ...

How come my picture is clinging to the bottom of the container?

I am facing an issue where my "vertical rule" is sticking to the bottom of the container when placed to the right of the image. <div> <div style="display:inline-block; width:210px;"> <img src="res/img/PlayBtn.png" style="top:- ...

Vertical centering of inline-block elements remains unaffected by line-height changes

I attempted to center an inline-block vertically in the following manner: div { width: 50px; height: 50px; background: red; line-height: 50px; } span { display: inline-block; width: 20px; height: 20px; background: white; } <div> ...

The Carousel Slider seems to encounter issues when trying to implement it with *ngFor in Angular 8

Currently tackling an issue in Angular 8 where my slider functions perfectly with static data. However, upon attempting to loop through some dynamic data, the 'left' and 'right' buttons on the carousel cease to work. The images also fai ...

Rotation of the SVG coordinate system distorts angles

My comprehension of SVG, particularly the viewport, viewBox, and the user coordinate system, seemed fairly solid. In the initial example provided below, we utilized a viewBox with a matching aspect ratio as the viewport. As expected, there was no distorti ...

Include the necessary attribute

I am facing a situation in my HTML code where I need to insert the attribute required="required", but I am having trouble locating the specific location. My goal is to add this attribute using jQuery, and I have attempted to achieve this with the following ...

Issues with Ruby image styles causing improper resizing of images

Looking for some guidance on how to address this issue. I added the following code to post.rb has_attached_file :image, styles: { medium: "300x300>", thumb: "100x100>" } validates_attachment_content_type :image, content_type: /&b ...

Tips for styling buttons in react-admin with custom CSS

I need some help with customizing buttons in react-admin. I am new to the platform and unsure about how to go about changing the button CSS for various actions such as create, edit, and export. Can anyone provide guidance on the best way to customize these ...

PNG file unable to display in Google Chrome

I created an image using paint.net and saved it as a .png file. However, when I try to display the image on my website, only the borders show up without any image content. Here is the code I used: HTML <a href="home.php"><img id="logo" src="../i ...

Disappearance of attribute in asp .net TextBox

Here is my asp .net code snippet: <asp:TextBox CssClass="siteinput required" ID="TextTitle" runat="server" Width="100%" MaxLength='<%# int.Parse(Request.QueryString["id"]) == 49 ? 40 : 15 %>' placeholder="Title" required="required">& ...

I am in need of a datepicker for my project that will display the END date as the current date and set the START date as 7 days before the END date

$(document).ready(function () { $("#end").datepicker({ dateFormat: "dd-M-yy", minDate: 0, onSelect: function () { var start = $('#start'); var startDate = $(this).datepicker('getDate') ...

Dealing with a routing issue in node.js/express involving JavaScript and CSS

I'm facing an issue. I need to set up a route from localhost.../cars to localhost../bmw/x1 On the localhost../cars page, there's a button that, when clicked, should load localhost../bmw/x1 This is the JavaScript code I have: const express = req ...

Unique calculation for rotational movement

I am currently developing a unique compass application. Although the project is progressing well, I am facing a significant challenge with one aspect: My code calculates degree angles within the range of -360 and 360: -318°, -29°, 223°, -163°, ... ...