Foundation: How to stack columns in responsive layout? - layout

Trying to figure out how to a do a responsive layout using Foundation. I am new to this and familiar with the ability to use push and pull but I am struggling trying to figure out how to stack items in a single row.
Visual: http://i.imgur.com/q1LAvIa.png
<div class="row">
<div class="small-12 large-? columns"> A </div>
<div class="small-12 large-? columns"> B </div>
<div class="small-12 large-? columns"> C </div>
</div>
Thanks in advance!

i think your code (according to your image) would be like:
<div class="row">
<div class="small-12 large-6 large-push-6 columns">A</div>
<div class="row">
<div class="small-12 large-6 large-pull-6 columns">B</div>
<div class="small-12 large-6 columns">C</div>
</div>
</div>
</div>
You could check "Advanced" & "Source Ordering" sections in http://foundation.zurb.com/docs/components/grid.html

Related

Bootstrap Why text doesn't change line properly

The text doesn't change line properly, I thought it should run in the column and auto change to next line, so they are stay in the column. That's what I saw in the video but is not working.
Thanks for helping.
Here are pictures.
https://ppt.cc/fr1JQx , https://ppt.cc/fPDr2x
Here is my code.
<style type="text/css">
.item:first-letter{
font-size: 50px;
float: left;
}
.item{
background-color: rgb(62, 116, 163);
}
</style>
</head>
<body>
<div class="container">
<div class="row g-5">
<div class="col-3 mb-4" >
<div class="item h-100 width-10">
A abcdabcdabcdabcdabcdabcd
abcdabcdabcdabcdabcdabcd
abcdabcdabcdabcdabcd</div>
</div>
<div class="col-3 mb-4">
<div class="item h-100">
B abcdabcdabcdabcdabcdabcdabcd
abcdabcdabcdabcdabcdabcd
</div>
</div>
<div class="col-3 mb-4">
<div class="item h-100">
C abcdabcdabcdabcdabcdabcdabcd
abcdabcdabcdabcdabcdabcdabcdabcd
abcdabcdabcdabcdabcdabcdabcdabcd
</div>
</div>
<div class="col-3 mb-4">
<div class="item h-100">
D abcdabcdabcdabcdabcdabcdabcd
abcdabcdabcdabcdabcdabcdabcdabcd</div>
</div>
</div>
</div>
Two options to fix:
I found this answer which explains in a bit more detail, but if this is really your content (I doubt it) you need to add this to your CSS:
word-wrap:break-word;
Otherwise I've slightly tweaked your layout and added some real content:
<div class="container">
<div class="row">
<div class="col-3 mb-4">
<p class="h-100 item">
A This is some normal text. I don't know the difference?
</p>
</div>
<div class="col-3 mb-4">
<p class="h-100 item">
B You need to use a normal paragraph structure, testing testing testing testing
</p>
</div>
<div class="col-3 mb-4">
<p class="h-100 item">
C abcdabcdabcdabcdabcdabcdabcd
abcdabcdabcdabcdabcdabcdabcdabcd
abcdabcdabcdabcdabcdabcdabcdabcd
</p>
</div>
<div class="col-3 mb-4">
<p class="h-100 item">
D abcdabcdabcdabcdabcdabcdabcd
abcdabcdabcdabcdabcdabcdabcdabcd
</p>
</div>
</div>
</div>
You can see that the columns with garbage content are still broken, but the ones I changed work fine.

Modx GetImageList: Retrieve Every Other MIGX Entry

I am trying to have GetImageList retrieve every other/second entry in the MIGX tv. This way I can have two calls and split them up between two bootstrap columns. It just looks better that way. What parameters can I include in the snippet to do so?
[[getImageList?
&tvname=`Success Stories`
&tpl=`successtpl`
]]
Thanks!
I was able to use two getImageList calls, one in each column, each with a different conditional based on [[+_alt]]:
[[+_alt:is=`1`:then=`
<div class="col-md-12 col-sm-12 col-xs-12 cl-stacked-margin-bottom">
<div id="cl-tesimonial">
<div class="testimonial-content"><i class="fa fa-quote-left" aria-hidden="true"></i>
[[+client_testimony]]
<h2 class="cl-client-name">[[+client_name]]</h2>
<div class="cl-author image-testimonial"> <img src="[[+client_img:notempty=`[[+client_img]]`:else=`[[++assets_url]]img/client_images/testimonial.jpg" alt="[[+client_name]]">
</div>
</div>
</div>
</div>
`:else=``]]
and:
[[+_alt:is=`1`:then=``:else=`
<div class="col-md-12 col-sm-12 col-xs-12 cl-stacked-margin-bottom">
<div id="cl-tesimonial">
<div class="testimonial-content"><i class="fa fa-quote-left" aria-hidden="true"></i>
[[+client_testimony]]
<h2 class="cl-client-name">[[+client_name]]</h2>
<div class="cl-author image-testimonial"> <img src="[[+client_img:notempty=`[[+client_img]]`:else=`[[++assets_url]]img/client_images/testimonial.jpg" alt="[[+client_name]]">
</div>
</div>
</div>
</div>
`]]

Cards are in 2 rows?

i tried to make something new in materializecss and I created one div with class row in which I have put 2 cards.one cards is in div with class col s4 and other one is in div with class col s8.
Those cards are in 2 separate rows. Cannot figure out why. Why are they not in same row?
here is example of code, first div with class row does not work fine, second one works fine, what is the difference?
<div class="row"><!-- start top vijesti -->
<div class="col s1">1</div>
<div class="col s7">ff</div>
<div class="col s4">ff</div>
</div><!-- end top vijesti -->
<div class="row">
<div class="col s1">1</div>
<div class="col s1">2</div>
<div class="col s1">3</div>
<div class="col s1">4</div>
<div class="col s1">5</div>
<div class="col s1">6</div>
<div class="col s1">7</div>
<div class="col s1">8</div>
<div class="col s1">9</div>
<div class="col s1">10</div>
<div class="col s1">11</div>
<div class="col s1">12</div>
</div>
I tried replicating your problem but did not see anything wrong with it. Perhaps you might want to have a look at this (if that is what you are trying to achieve) to see if you are doing it right, or probably fork it or post your code for us to actually determine what is wrong.
HTML:
<div class="row"><!-- start top vijesti -->
<div class="col s1">1</div>
<div class="col s7">ff</div>
<div class="col s4">ff</div>
</div><!-- end top vijesti -->
<div class="row">
<div class="col s1">1</div>
<div class="col s1">2</div>
<div class="col s1">3</div>
<div class="col s1">4</div>
<div class="col s1">5</div>
<div class="col s1">6</div>
<div class="col s1">7</div>
<div class="col s1">8</div>
<div class="col s1">9</div>
<div class="col s1">10</div>
<div class="col s1">11</div>
<div class="col s1">12</div>
</div>
<div class="row">
<div class="col s4">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<span class="card-title">Card Title</span>
<p>I am a very simple card. I am good at containing small bits of information.
I am convenient because I require little markup to use effectively.</p>
</div>
<div class="card-action">
This is a link
This is a link
</div>
</div>
</div>
<div class="col s8">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<span class="card-title">Card Title</span>
<p>I am a very simple card. I am good at containing small bits of information.
I am convenient because I require little markup to use effectively.</p>
</div>
<div class="card-action">
This is a link
This is a link
</div>
</div>
</div>
</div>
CSS:
.col {
border: 1px solid;
}
.row {
border: 1px dotted;
}

content of ion-content go inside ion-header-bar

I am new to ionic framework. When I use ion-content like this
<ion-view>
<ion-header-bar class="bar bar-header bar-positive">
<div class="buttons">
<button class="button" ng-click="doSomething()">Left Button</button>
</div>
<h1 class="title">Title!</h1>
<div class="buttons">
<button class="button">Right Button</button>
</div>
</ion-header-bar>
<ion-content class="has-header">
<div class="row">
<div class="col">
<i class="fa fa-university"></i>
</div>
<div class="col">.col</div>
<div class="col">.col</div>
</div>
<div class="row">
<div class="col">.col</div>
<div class="col">.col</div>
<div class="col">.col</div>
</div>
</ion-content>
</ion-view>
First row go inside header bar. What's the problem?
I've used requirejs to load controller .
I didn't inject ionic module during bootstraping.
After inject ionic in module this problem solved.

CMSMS does not display html code in edito

I have a very weird problem with CMSMS. I have some HTML in my header file, there should be 2 links, but every time I paste a second one and click Apply- it disappears from editor. Although it shows on website.
CMSMS version: 1.11.9
<div class="header">
<div class="container">
<div class="row-fluid">
<div class="logo_wrapper">
<div class="logo"><img src="{root_url}/ui/images/logo.png" alt="" /></div>
</div>
<div class="span6 pull-right">{if $sid == 1 }
<div class="kabinet pull-right"><a class="rounded" href="apps/customer/web/profile/edit"> Профиль</a></div>
{else}
<div class="kabinet pull-right"><a class="rounded dark" href="#"> Статус доставки</a> <a class="rounded" href="apps/customer/web/login"> Личный кабинет</a></div>
{/if}</div>
</div>
<hr />
<div>
<div class="nav">
<div class="nav-inner">{menu loadprops=0}</div>
</div>
</div>
</div>
</div>
It should be after save:
<div class="header">
<div class="container">
<div class="row-fluid">
<div class="logo_wrapper">
<div class="logo"><img src="{root_url}/ui/images/logo.png" alt="" /></div>
</div>
<div class="span6 pull-right">{if $sid == 1 }
<div class="kabinet pull-right"><a class="rounded" href="apps/customer/web/profile/edit"> Профиль</a>
(this link keeps disappearing)
<a class="rounded no-bg-color" href="apps/customer/web/logout"><i class="icon-off icon-white"></i></a>
</div>
{else}
<div class="kabinet pull-right"><a class="rounded dark" href="#"> Статус доставки</a> <a class="rounded" href="apps/customer/web/login"> Личный кабинет</a></div>
{/if}</div>
</div>
<hr />
<div>
<div class="nav">
<div class="nav-inner">{menu loadprops=0}</div>
</div>
</div>
</div>
</div>
It's probably the HTML editor (MicroTiny I expect) believing that link is invalid HTML and throwing it away.
Set the editor to HTML mode so that you can edit the HTML directly (not WYSIWYG). It will then accept your edits and not try to edit them.

Resources