Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Compass Basics Compass Layout and Typography Multi-Column Layout

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Points

Compass: @include column-span fails to span h2, h3

Hi,

I am following along in the Compass Basics class and I am finding that @include column-span(all) fails to span the h2 and h3 headers across the three columns.

Has anyone else encountered this?

Thanks!

// LAYOUT STYLES

$legacy-support-for-mozilla: false;
$legacy-support-for-ie: false;
$experimental-support-for-opera: false;
$breakpoint: 769px;

.main-header {
  @include clearfix;
}
.main-logo {
  @media (min-width: $breakpoint) {
    @include float-left;
  }
}
.main-nav {
  @media (min-width: $breakpoint) {
    @include float-right;
    @include horizontal-list(10px, left);
  }
}

// sticky footer

@include sticky-footer(120px, ".container", ".root-footer",".main-footer");

//main-column layout

.main-content{
  @media (min-width: 769px) {
    @include column-count(3);
    @include column-gap(3em);
    @include column-rule(1px solid #ccc);
    h2, h3{
      @include column-span(all);
    }
  }
}

1 Answer

Caesar Bell
Caesar Bell
24,827 Points

What is the exact issue you are getting. Your code seems to be correct from what you provided above. As you can see it matches mines and mines work. Could the error be generating from a different part of your code ?

// LAYOUT STYLES

.main-header {
  @include clearfix; 
}
.main-logo {
  @media (min-width: $breakpoint) {
    @include float-left;
  }
}
.main-nav {
  @media (min-width: $breakpoint) {
    @include float-right;
    @include horizontal-list(10px, left);
  }
}

// sticky footer 

@include sticky-footer(100px, ".container", ".root-footer", ".main-footer"); 

// multi-column layout 

.main-content {
    @media (min-width: $breakpoint) {
        @include column-count(3);
        @include column-gap(3em);
        @include column-rule(1px, solid, #ccc); 
        h2, h3{
            @include column-span(all); 
        }
    }
}

Also you should use the varaible $breakpoint thorughout your code too.