I am using Foundation 6 in a Wordpress site.
The issue I face is solely happening on iPad Air. It works fine on older iPads and all other devices and browsers.
What happens is that I have 6 small-2 columns but the last one is displayed in a new line.
I dont understand how this can happen.
Here is the page: https://lagalope.com/the-collection-2/
Here is the html structure:
<div class="row">
<div class="small-2 column">
content....
</div>
<div class="small-2 column">
content....
</div>
<div class="small-2 column">
content....
</div>
<div class="small-2 column">
content....
</div>
<div class="small-2 column">
content....
</div>
<div class="small-2 column">
content....
</div>
</div>
When I reproduce this in a JSFiddle this is working fine so it means there is something wrong in my wordpress theme...: https://jsfiddle.net/curuba/s5twohf5/2/
[EDIT]
It seems it is resolved when I avoid using flex-grid. When I comment the following line, all is fine:
#include foundation-flex-grid;
I don't understand why this is causing the issue. I let this question as unanswered as this is just a further direction to the root cause but not a resolution.
Try this :
// Fix ios flex bug
.row {
.column:first-child {
flex: 1 1 0;
}
}
Related
I just wanna know the correct class to use for divs..currently my index page content divs look as below:
This is okay for dekstop view, I used class="large-4 columns" for the above. But I want something like below for tablet and mobile view.
How do I achieve this plz?
I TRIED but din't work as i wanted.
<div class="large-4 columns">
<div class="medium-2 columns">
<img src="images/launch-home.png" alt="" height="60px;" />
</div>
<div class="medium-10 columns">
<h1>LAUNCH OF THE XXXX</h1>
XXXXX, a pioneering voluntary industry-wide initiative that is dedicated to the development and advocacy of professional standards, including ethical standards, was launched on 24 September 2014. The event was officiated by both the Governor of Bank Negara Malaysia and Chairman of the Securities Commission Malaysia and was attended by leaders of the financial services industry.
</div>
</div>
If your settings has 12 total columns it should be like this:
<div class="row">
<div class="medium-12 large-4 columns">
<!--inaugural-->
</div>
<div class="medium-12 large-4 columns">
<!--launch-->
</div>
<div class="medium-12 large-4 columns">
<!--insights-->
</div>
</div>
I think your first tag is not at good place
<div class="row">
<div class="large-12 columns">LARGE VIEW</div>
<div class="medium-4 columns">
<img src="images/launch-home.png" alt="" height="60px;" />
</div>
<div class="medium-8 columns">
<h1>LAUNCH OF THE XXXX</h1>
...
</div>
</div>
I'll try to ask this here, because on Foundation forums I got no answer.
I'm making a mixed layout and I want to use Equalizer to make the first column and the second column the same height. The catch is that the second column is another grid layout. Inside that second grid, Equalizer works like a charm, but between the first and second column it does nothing. I've searched here and there are a lot of people with similar problems, but I did not found a solution for mixed layout, even with simple jQuery functions.
Anyone can help?
Here's the code:
<div class="row">
<div class="large-12 columns">
<div class="row" data-equalizer>
<!-- first column -->
<div class="large-2 small-2 columns">
<div class="panel" data-equalizer-watch>
<!-- here goes an image -->
</div>
</div>
<!-- second column -->
<div class="large-10 small-10 columns" data-equalizer-watch>
<div class="row" data-equalizer>
<div class="large-4 small-12 columns">
<p class="panel" data-equalizer-watch>Text</p>
</div>
<div class="large-4 small-12 columns">
<p class="panel" data-equalizer-watch>Text</p>
</div>
<div class="large-4 small-12 columns">
<p class="panel" data-equalizer-watch>Text</p>
</div>
</div>
<div class="row">
<div class="large-12 small-12 columns">
<p class="panel">Longer text</p>
</div>
</div>
<div class="row" data-equalizer>
<div class="large-4 small-12 columns">
<p class="panel" data-equalizer-watch>Text</p>
</div>
<div class="large-4 small-12 columns">
<p class="panel" data-equalizer-watch>Text</p>
</div>
<div class="large-4 small-12 columns">
<p class="panel" data-equalizer-watch>Text</p>
</div>
</div>
<div class="row">
<div class="large-12 small-12 columns">
<p class="panel">Longer text</p>
</div>
</div>
</div>
</div>
</div>
I checked on version 5.2.2: you just cannot do this.
I looked at Foundation foundation.equalizer.js file,
this function is simply not suited for equalize an equalizer inside an equalizer.
In 5.2.2 version, at line 30, you can see how it select elements to equalize:
vals = equalizer.find('[' + this.attr_name() + '-watch]:visible')
There is no dinstinction between dom levels, it catches every data-equalizer-watch without looking for any data-equalizer inside a data-equalizer
I'm using foundation 5 and trying to put some smaller controls together on one line and having some issues. I'm using offset in the main grid to center the form. That needs to stay the same. The real question is how do I get the 6 controls to look decent together on the same line (3 labels, 3 textboxes)? I'd be very happy with a little extra spacing separating Servings and the Prep and Cook time controls.
Code:
<div class="row">
<div class="small-3 large-1 large-offset-3 columns"><span id="makemeboldlbl" class="inline radius secondary label right">Servings:</span></div>
<div class="small-2 large-1 columns left"><input type="text" id="servings" name="servings" value="<? echo $servings ?>" /></div>
<div class="small-7 large-3 columns">
<div class="row">
<div class="small-3 columns"><span id="makemeboldlbl" class="inline radius secondary label right">Prep (min):</span></div>
<div class="small-2 columns"><input type="text" id="prep_min" name="prep_min" value="<? echo $prep_min ?>" /></div>
<div class="small-3 columns"><span id="makemeboldlbl" class="inline radius secondary label right">Cook (min):</span></div>
<div class="small-2 columns"><input type="text" id="cook_min" name="cook_min" value="<? echo $cook_min ?>" /></div>
</div>
</div>
<div class="large-4 columns"> </div>
</div>
I've attached a screenshot of how it looks on the page. As you can see it's overlapping.
Remove "right" class and give them some space.
As I know large-12 class only show stuff on large screen. If I decrease the size like on mobile it won't show anything unless I assign another class small-12
Now I've this code and it's showing large-12 in mobile as well and small-12 on large screen as well.
<div class="row">
<div class="large-12 columns">
<div class="panel">
<img src="design/images/nationalskills_logo.png" />
<img src="design/images/toyota_logo.png" style="float: right;"/>
</div>
</div>
<div class="small-6 columns">
<div class="panel">
<img style="width: 30%;" src="design/images/nationalskills_logo.png" />
<img style="width: 30%;" src="design/images/toyota_logo.png" style="float: right;"/>
</div>
</div>
</div>
Can anyone please help me out.
I want to show larger-12 div on big screens and small-6 only on small screen not on big screen. What is wrong with my code.
12 class only show stuff on large screen. If I decrease the size like on mobile it won't show anything unless I assign another class small-12"
This assumption is totally wrong just see the doc http://foundation.zurb.com/docs/components/grid.html
For image resizing use interchange option.
http://foundation.zurb.com/docs/components/interchange.html
You can use different size classes for coloumns in one single div which hides other class definitions based on size..
<div class="row">
<div class="small-6 large-6 columns">
<div class="panel">
<img data-interchange="[/path/to/default.jpg, (default)], [/path/to/bigger-image.jpg, (large)]" />
<img class="right" data-interchange="[/path/to/default.jpg, (default)], [/path/to/bigger-image.jpg, (large)]" />
</div>
</div>
</div>
With Zurb foundation version 3, if I include the foundation.css file
I'm able to make grids, etc.
With version 4, if I do everything the same way, it does not work.
What am I missing?
If I do everything the same way
There are new classes to use for grids in V4. You cannot just say four columns but instead specify if the columns are for a large or small view/device. So you need to have small-X or large-X where X is the number of columns a div needs to consume. Here's an example:
<div class="row">
<div class="ten columns centered">
<h1>This grid won't work on V4</h1>
<div class="row">
<div class="four columns">
<div class="panel">
<p>Left panel</p>
</div>
</div>
<div class="four columns">
<div class="panel">
<p>Center panel</p>
</div>
</div>
<div class="four columns">
<div class="panel">
<p>Right panel</p>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="ten columns centered">
<h1>But this will...</h1>
<div class="row">
<div class="small-2 large-4 columns">
<div class="panel">
<p>Left panel</p>
</div>
</div>
<div class="small-4 large-4 columns">
<div class="panel">
<p>Center panel</p>
</div>
</div>
<div class="small-6 large-4 columns">
<div class="panel">
<p>Right panel</p>
</div>
</div>
</div>
</div>
</div>
Notice the combination of small and large on a single div. What it tells you is that the Left panel will only be two columns on small devices (mobile phones) and four columns on large devices such as on a desktop. Similarly, the Right panel will be six columns on small devices and four columns on large devices. You can see the difference by playing with the size of your browser.
To get more information on how the V4 Grid works, go to this page.