Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Foundation Equalizer

Foundation Equalizer

We can add to the container element data-equalizer attribute, and add to each child element data-equalizer-watch attribute to create an equalizer with the same height. The tallest element determines the height of the others.

Note: Equalizer requires JavaScript, so you need to initialize Foundation JS:

Example

<

div

class=

"row"

data-equalizer

<

div

class=

"medium-4 columns panel"

data-equalizer-watch

    Lorem ipsum...

 

<

/div

<

div

class=

"medium-4 columns panel"

data-equalizer-watch

    Sed ut...

 

<

/div

<

div

class=

"medium-4 columns panel"

data-equalizer-watch

    Lorem ipsum...

 

<

/div

<

/div

<

script

$(document).ready(function() {

    $(document).foundation();

})

<

/script

Try it »


Equalizer for Different Screens

On the equalizer, by adding data-equalizer-mq="value" attribute to set the same height for different screen sizes. The value can be one of the following:

Value Description Example
medium-up Default. Create containers of the same height for widths greater than 40.063em
large-up Create containers of the same height for widths greater than 64.063em Try it
xlarge-up Create containers of the same height for widths greater than 90.063em Try it
xxlarge-up Create containers of the same height for widths greater than 120.063em Try it

Nested Content

is data-equalizer and data-equalizer-watch attribute with the same value. This connects them to the equalizer container together. Repeat nesting the equalizer multiple times, making sure they are matched:

Example

<

div

class=

"row"

data-equalizer=

"first"

<

div

class=

"medium-4 columns"

   

<

div

class=

"panel"

data-equalizer-watch=

"first"

<

h3

Panel

<

/h3

<

div

class=

"row"

data-equalizer=

"second"

<

div

class=

"panel"

data-equalizer-watch=

"second"

<

h3

Nested Panel

<

/h3

<

p

Lorem ipsum...

<

/p

<

/div

<

div

class=

"panel"

data-equalizer-watch=

"second"

<

h3

Nested Panel

<

/h3

<

p

Lorem ipsum...

<

/p

<

/div

<

div

class=

"panel"

data-equalizer-watch=

"second"

<

h3

Nested Panel

<

/h3

<

p

Lorem ipsum...

<

/p

<

/div

<

/div

<

/div

<

/div

<

div

class=

"medium-4 columns"

   

<

div

class=

"panel"

data-equalizer-watch=

"first"

<

h3

Panel

<

/h3

<

p

Ut enim...

<

/p

<

/div

<

/div

<

div

class=

"medium-4 columns"

   

<

div

class=

"panel"

data-equalizer-watch=

"first"

<

h3

Panel

<

/h3

<

p

Lorem ipsum....

<

/p

<

/div

<

/div

<

/div

Try it »