I'm trying to achieve something in Foundation 6 and I can't figure it out. Here's a graphic illustrating my issue.
Graphic of what I'm trying to do
I do! Sorry about that :)
<!-- Signup / Login / FAQ / Social -->
<div class="row">
<!-- Left Side -->
<div class="large-4 medium-4 columns Rem1MarginBottom hide-for-small-only">
<!-- Have a friend-->
<h4 class="georgiaNormal">Text Column</h4>
</div>
<div class="large-2 medium-2 columns" style="border: 1px solid;">
<h4 class="georgiaBold">Link 1</h4>
</div>
<div class="large-2 medium-2 columns" style="border: 1px solid;">
<h4 class="georgiaBold">Link 2</h4>
</div>
<!-- Left Side -->
<!-- Right Side -->
<div class="large-4 medium-4 columns">
<div class="row" style="border: 1px solid;">
<div class="large-12 medium-12 columns hide-for-small-only">
<h4 class="georgiaBoldSmall centeredRed trouble">Text</h4>
</div>
<div class="large-12 medium-12 columns hide-for-small-only">
<h4 class="georgiaNormalSmall centeredRed faq_contact">Text Link page or Link.
</h4>
</div>
<div class="large-12 medium-12 small-12 columns Rem1MarginTop text-center Rem1MarginBottom">
<img src="https://picturethismaths.files.wordpress.com/2016/03/fig6bigforblog.png" width="50" alt="#" /> <img src="https://picturethismaths.files.wordpress.com/2016/03/fig6bigforblog.png" width="50" alt="#" />
</div>
</div>
</div>
<!-- Right Side -->
</div>
Thanks for adding the code.
What you have is four columns, but what you really want is three columns and for some content to stack in the middle column.
Try doing this to the left side give this a try:
<!-- Signup / Login / FAQ / Social -->
<div class="row">
<!-- Left Side -->
<div class="large-6 medium-6 columns Rem1MarginBottom hide-for-small-only">
<!-- Have a friend-->
<h4 class="georgiaNormal">Text Column</h4>
</div>
<div class="large-2 medium-2 columns" style="border: 1px solid;">
<div><!-- this div should stack now -->
<h4 class="georgiaBold">Link 1</h4>
</div>
<div><!-- this div will be below the other link -->
<h4 class="georgiaBold">Link 2</h4>
</div>
</div>
<!-- Left Side -->
<!-- Right Side -->
...
<!-- Right Side -->
</div>
I changed the first column to be '6' wide and removed what you did have as the third column (the one that contained your second link).
So now the middle column contains two divs and they will stack on top of each other. You may need to add some custom css to get the design you're after, but at least now you have the correct structure.
Related
I'm creating a real estate with boostrap ccs and i'm trying organized my ads. However i can't find the way to make them all to the same size. i want for each line 3 ads. In this search only found 5 ads.
the next image is what i have using:
div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-5"
My situation
And what i'm looking for is:
The future
thanks for helping me
<div class="row">
<div class="col-4">
<!-- Add advert item here -->
</div>
<div class="col-4">
<!-- Add advert item here -->
</div>
<div class="col-4">
<!-- Add advert item here -->
</div>
</div>
<div class="row">
<div class="col-4">
<!-- Add advert item here -->
</div>
<div class="col-4">
<!-- Add advert item here -->
</div>
</div>
Also you will need to adjust for media queries for smaller screens.
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
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>
I'd like to put 3 images next to one image in a responsive row layout but I can't figure out how to make the contents of this row to be equal in height. I can make the images any dimension if it's as simple as "The large image should be 900x1200px, the 3 small ones should be 300x500px" I am also using foundation4 for this as well. The images could be cropped or stretched a little too.
http://jsfiddle.net/uEyCF/2/
<div id="image_box">
<div class="col">
<img src ="http://placehold.it/200x100" />
<img src ="http://placehold.it/200x100" />
<img src ="http://placehold.it/200x100" />
</div>
<div class="col">
<img src ="http://placehold.it/200x350" />
</div>
</div>
This should get you started:
<div id="image_box" class="row">
<div class="small-6 large-6 columns left-col">
<div class="row">
<div class="large-12 columns">
<img src="http://placehold.it/200x100" />
</div>
</div>
<div class="row">
<div class="large-12 columns">
<img src="http://placehold.it/200x100" />
</div>
</div>
<div class="row">
<div class="large-12 columns">
<img src="http://placehold.it/200x100" />
</div>
</div>
</div>
<div class="small-6 large-6 columns">
<img src="http://placehold.it/200x340" />
</div>
</div>
<style type="text/css">
.left-col img { margin-bottom:20px; float:right;}
</style>
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.