Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Skeleton Responsive Nested Columns

Featured Replies

This is driving me crazy now. I am using Skeleton Responsive although I don't think that's causing the issue.

 

This is my code

<div class="container">
<div class="sixteen columns outer_holder clearfix">
<div class="twelve columns"> 
<h2>Title</h2>
<p>Content Here</p>
</div>
<div class="four columns"><a href="#" class="button">View More</a></div>
</div>
</div>

When I add padding to the outer div "outer_holder" the two divs inside no longer float, If i remove padding all is fine.

 

here is my css

 

.outer_holder {
 border: 1px solid #eaeaea;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    border-radius: 4px;
	box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
}

 

  • Author

 

This is driving me crazy now. I am using Skeleton Responsive although I don't think that's causing the issue.

 

This is my code

<div class="container">
<div class="sixteen columns outer_holder clearfix">
<div class="twelve columns alpha"> 
<h2>Title</h2>
<p>Content Here</p>
</div>
<div class="four columns omega"><a href="#" class="button">View More</a></div>
</div>
</div>

When I add padding to the outer div "outer_holder" the two divs inside no longer float, If i remove padding all is fine.

 

here is my css

 

.outer_holder {
 border: 1px solid #eaeaea;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    border-radius: 4px;
	box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
}

I'm not familiar with Skeleton Responsive. I've not had to look for frameworks since Bootstrap is working out so well for me.

 

So with only reading what you've written, I can only suggest two potential solutions.

 

First, could it be your border on the outer holder that is causing an issue? Borders can add extra width and throw out a carefully assigned percentage or something, but that is unlikely since the problem is on the inside.

 

Second, if Skeleton Responsive sets hard calculated widths of your divs, then the border-box controlled padding may be reducing their calculated with and knocking one down a line. If that's the case then I really don't know what to suggest outside of adding an !important tag onto your width options maybe.

 

 

Sorry if this isn't much help. Maybe it will set you on the right track.

You seem to have answered the question yourself. The padding is widening your element meaning they no longer sit by side.

 

If you are nesting columns, have you tried adding .alpha to your left column and .omega to your right column?

  • 2 weeks later...

I know skeleton quite well.

 

As a rule of thumb.

 

The container sets the width to 960

 

The subbordinate divs take the area within the 960

 

ie

 

container

two-thirds col one-third col

 

 

don't nest any more than that. Also close the divs and start and new container.

 

Hope this helps.

Edited by Refresh Websites

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.