Force different parts of your content to the same height. Very useful if you want to present to boxes side by side. Responsive and bootstrap-friendly.
Sometimes we want to display to boxes side by side and they have to look the same. CSS doesn’t always help.
This plugin will use jQuery to detect the boxes you want and force them all to have the same size. The size is uses is the size of the tallest box.
If you have a some parts of your content that need to have the same height, simply wrap them with the [sameheight/]
shortcode like this:
[sameheight]
This is a short text
[/sameheight]
[sameheight]
This is a very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very long text
[/sameheight]
When the html renders on your screen, both parts content parts will look equally height. This is very useful if they are floating next to each other and they have a background.
You can group shortcodes like this:
[sameheight group=”1″]
This is a very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very long text
[/sameheight]
[sameheight group=”1″]
This is a short text
[/sameheight]
[sameheight group=”2″]
This is another short text
[/sameheight]
[sameheight group=”2″]
This text is long, but not quite as long as the previous one. So, I don’t want these to parts to look as long. But they should still look the same.
[/sameheight]
You can add a breakpoint like this.
[sameheight breakpoint=”xs” ] (You could even use no breakpoint at all)
This is a very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very long text
[/sameheight]
[sameheight breakpoint=”xs” ] (You could even use no breakpoint at all)
This text always has to use the same height than the previous one.
[/sameheight]
[sameheight breakpoint=”md”]
This is a very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very long text
[/sameheight]
[sameheight breakpoint=”md”]
This text only has to use the same height when it is next to the previous, but not when it is underneath on smarphones.
[/sameheight]
You have these breakpoints (those familiar with bootstrap know them):
Names and widths are based on bootstrap.
Please, note that shortcodes with different “breakpoint” will be in different groups regardless of the “group” setting. You can still use “group” to separate to groups with the same “breakpoint”.
Easy:
[sameheight additional_classes=”my-class1 my-classA”]
This is a short text
[/sameheight additional_classes=”my-class2 my-classB”]
[sameheight]
This is a very, very, very, very, very, very long text
[/sameheight]
Sure:
[sameheight group=”1″ breakpoint=”md” additional_classes=”my-class1 my-classA” /] will work.
No! If you are editing your html, you can put the right properties in it. That’s all tha shortcode does. Make sure you add the class ‘same-height’. If you use a break point, add it with a hyphen (-) like this: ‘same-height-xs’, ‘same-height-sm’, ‘same-height-md’, or ‘same-height-lg’. The Javascript is looking for those classes to identify the html elements it has to work on.
If you are grouping boxes, use the ‘same-height-group’ property. Like <div class="same-height" same-height-group="1" >
You can group shortcodes like this:
[sameheight group=”1″]
This is a very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very long text
[/sameheight]
[sameheight group=”1″]
This is a short text
[/sameheight]
[sameheight group=”2″]
This is another short text
[/sameheight]
[sameheight group=”2″]
This text is long, but not quite as long as the previous one. So, I don’t want these to parts to look as long. But they should still look the same.
[/sameheight]
You can add a breakpoint like this.
[sameheight breakpoint=”xs” ] (You could even use no breakpoint at all)
This is a very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very long text
[/sameheight]
[sameheight breakpoint=”xs” ] (You could even use no breakpoint at all)
This text always has to use the same height than the previous one.
[/sameheight]
[sameheight breakpoint=”md”]
This is a very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very long text
[/sameheight]
[sameheight breakpoint=”md”]
This text only has to use the same height when it is next to the previous, but not when it is underneath on smarphones.
[/sameheight]
You have these breakpoints (those familiar with bootstrap know them):
Names and widths are based on bootstrap.
Please, note that shortcodes with different “breakpoint” will be in different groups regardless of the “group” setting. You can still use “group” to separate to groups with the same “breakpoint”.
Easy:
[sameheight additional_classes=”my-class1 my-classA”]
This is a short text
[/sameheight]
[sameheight additional_classes=”my-class2 my-classB”]
This is a very, very, very, very, very, very long text
[/sameheight]
Sure:
[sameheight group=”1″ breakpoint=”md” additional_classes=”my-class1 my-classA” /] will work.
No! If you are editing your html, you can put the right properties in it. That’s all tha shortcode does. Make sure you add the class ‘same-height’. If you use a break point, add it with a hyphen (-) like this: ‘same-height-xs’, ‘same-height-sm’, ‘same-height-md’, or ‘same-height-lg’. The Javascript is looking for those classes to identify the html elements it has to work on.
If you are grouping boxes, use the ‘same-height-group’ property. Like <div class="same-height" same-height-group="1" >
*We load the minified JS by default. If SCRIPT_DEBUG is set to true, the non minified is used
*We remove deprecated jQuery functions