Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,413 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,501 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.