Foundation 5: removing a gap at the left of my column - zurb-foundation

I want to get rid of the gap at the left of my green button on this screenshot. I can't seem to find any way to remove it.
Markup:
<div class="row">
<div class="small-4 medium-5 large-4 columns">
<a class="button" id="enroll_in_mooc" href="#">Enroll in MOOC</a>
</div>
<div class="small-6 medium-5 large-6 columns">
<ul class="small-block-grid-1 large-block-grid-2" id="jason_computing_features_list">
<li id="jason_computing_self_paced">Self-paced</li>
<li id="jason_computing_hours_week">4 hours a week</li>
<li id="jason_computing_assignments">3 Assignments</li>
<li id="jason_computing_challenges">18 Challenges</li>
</ul>
</div>
</div>
aa

By default, Foundation applies a right and left padding to columns. I've created a snippet with a couple of options. You can target the column; or simply create a class and add a rule for left-padding.
/* -- target the first-child column -- */
.row .columns:first-child {
padding-left: 0;
}
/* -- create a class ('button-enroll' for example ) -- */
.button-enroll {
padding-left: 0;
}
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundation/5.4.6/css/foundation.min.css" rel="stylesheet"/>
<div class="row">
<div class="small-4 medium-5 large-4 columns button-enroll">
<a class="button" id="enroll_in_mooc" href="#">Enroll in MOOC</a>
</div>
<div class="small-6 medium-5 large-6 columns">
<ul class="small-block-grid-1 large-block-grid-2" id="jason_computing_features_list">
<li id="jason_computing_self_paced">Self-paced</li>
<li id="jason_computing_hours_week">4 hours a week</li>
<li id="jason_computing_assignments">3 Assignments</li>
<li id="jason_computing_challenges">18 Challenges</li>
</ul>
</div>
</div>

Related

django-cms: How to create custom menu like image?

I'm new with django-cms and i want to add menu like image i post.
I have read the doc but i don't know how to create my custom menu.
I want to get something like this html code (Please add me explain):
some place in code i have .col-4, and another place i have .col-3 look image and code for more comprehension.
<ul class="menu">
<li class="toggle-menu">
<i class="fa icon_menu"></i>
</li>
<li class="first">
Accueil
</li>
<li>
Photographie
<div class="megamenu full">
<div class="row">
<div class="col-4">
<ul class="megamenu-list">
<li class="title">Présentation</li>
<li>A propos</li>
</ul>
</div>
<div class="col-4">
<ul class="megamenu-list">
<li class="title">Evènements</li>
<li>Mariage</li>
<li>Portrait</li>
</ul>
</div>
<div class="col-4">
<ul class="megamenu-list">
<li class="title">Entreprise et institutions</li>
<li>Portraits Corporate</li>
<li>Reportage entreprise</li>
</ul>
</div>
</div>
</div>
</li>
<li>
Production media
<div class="megamenu full">
<div class="row">
<div class="col-3">
<ul class="megamenu-list">
<li class="title">Présentation</li>
<li>A propos</li>
<li>Nos offres</li>
</ul>
</div>
<div class="col-3">
<ul class="megamenu-list">
<li class="title">Services</li>
<li>Montage</li>
<li>Drones</li>
</ul>
</div>
<div class="col-3">
<ul class="megamenu-list">
<li class="title">Vos évènements</li>
<li>Mariages</li>
<li>Reportage coorporate</li>
</ul>
</div>
<div class="col-3">
<ul class="megamenu-list">
<li class="title">Location</li>
<li>Cameras</li>
</ul>
</div>
</div>
</div>
</li>
</ul>
but i dont know how, please help

How to make 2 divs to fill 100% viewport height

To specify my question in detail, I have 2 divs. One of them is the main navigation and below my navigation I have a carousel (bootstrap). I want the carousel to fit perfectly to the bottom of the page when the user visits the page. Just for the aesthetics sake. I know I can set the height of the carousel to be e.g. 400px but each device's screen is different and I think it will look more professional and polished if the carousel's bottom will fit to the bottom of the screen regardless of the size of the window.
You could consider taking advantage of CSS's viewport-based units like vh and vw, which use a percentage of the available viewport width and height respectively :
.your-carousel {
/* This will occupy 100% of the available viewport */
height: 100vh;
}
This is supported in most modern browsers, so if you are already using Bootstrap, you should be fine.
This is my html by the way:
<body>
<!-- nav -->
<div class="container">
<a id="logo" class="font-raleway text-center" href="#">Denley</a>
<br>
<nav class="navbar navbar-default bold">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active">HOME <span class="sr-only">(current)</span></li>
<li>WOMEN</li>
<li>MEN</li>
<li>SHOES</li>
<li>ACCESSORIES</li>
<li>SALE OFF</li>
<li>COLLECTIONS</li>
<li>CONTACTS</li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
</div><!-- /.container -->
<div class="row">
<div class="col-xs-12">
<div class="col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-4 col-md-2 col-md-offset-5">
<div class="col-xs-3 icons"><img src="images/icons/account.png"></div>
<div class="col-xs-3 icons"><img src="images/icons/wish_list.png"></div>
<div class="col-xs-3 icons"><img id="cart-icon" src="images/icons/cart.png"></div>
<div class="col-xs-3 icons"><img src="images/icons/search.png"></div>
</div>
</div><!-- /col-xs-12 -->
</div><!-- /row -->
<div class="row">
<div class="container-fluid">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="images/test.jpg" alt="...">
<div class="carousel-caption">
...
</div>
</div>
<div class="item">
<img src="..." alt="...">
<div class="carousel-caption">
...
</div>
</div>
...
</div><!-- /carousel-inner -->
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>

Angular.js - include a fragment of template in template

I have 3 templates:
- main template for rendering some basic stuff,
- second template which renders whole tree
- third template which should render each eleement of that tree
When I include row_renderer.html then my variable called subItem is not visible in included template. When I copy that template to second template called nodes_renderer.html then everything seems fine.
How do I pass subItem variable to row_renderer.html?
Main template
{% verbatim %}
<div ui-tree data-drag-enabled="false" class="">
<ol ui-tree-nodes="" ng-model="list">
<li ng-repeat="item in list" ui-tree-node class="table">
<div ui-tree-handle class="header row" data-toggle="collapse">
<div class="col-sm-4 col-md-2" style="">
<input type="checkbox" />
{{item.name}} ({{item.submission_count}})
</div>
<div class="col-sm-4 col-md-2">
<i class="icon" ng-class="{'icon-chevron-right': collapsed, 'icon-chevron-down': !collapsed}"></i>
{{item.last_submission_date}}
</div>
<div class="col-md-6">
<i class="icon icon-file"></i> Pobierz raport
<i class="icon icon-times"></i> Zakończ zgłoszenie
<i class="icon icon-envelope"></i> Wyślij SMS
</div>
<div class="clearfix"></div>
</div>
<ol ui-tree-nodes="" ng-model="item.children">
<li ng-repeat="subItem in item.children" ui-tree-node ng-include="'nodes_renderer.html'">
</li>
</ol>
</li>
</ol>
</div>
{% endverbatim %}
Last fragment of main template:
<ol ui-tree-nodes="" ng-model="item.children">
<li ng-repeat="subItem in item.children" ui-tree-node ng-include="'nodes_renderer.html'">
</li>
</ol>
nodes_renderer.html
{% verbatim %}
<script type="text/ng-template" id="nodes_renderer.html">
<div ui-tree-handle class="row" ng-include="'row_renderer.html'" >
<ol ui-tree-nodes="" ng-model="subItem.children">
<li ng-repeat="subItem in subItem.children" ui-tree-node ng-include="'nodes_renderer.html'">
</li>
</ol>
</div>
</script>
{% endverbatim %}
row_renderer.html - reusable template
<script type="text/ng-template" id="row_renderer.html">
<div class="clearfix"></div>
<div class="col-md-12" >
Rodzaj Awarii: {{subItem.type_name}}
</div>
<div class="clearfix"></div>
<div class="col-sm-4 col-md-2">
<input type="checkbox" />
{{subItem.name}} ({{subItem.submission_count}})
</div>
<div class="col-sm-4 col-md-2">
<i class="icon" ng-if="subItem.children" ng-class="{'icon-chevron-right': collapsed, 'icon-chevron-down': !collapsed}"></i>
{{subItem.last_submission_date}}
</div>
<div class="col-sm-4 col-md-2">
<i class="icon icon-star"></i> Przypisz do mnie
</div>
<div class="col-md-6">
<i class="icon icon-file"></i> Pobierz raport
<i class="icon icon-times"></i> Zakończ zgłoszenie
<i class="icon icon-envelope"></i> Wyślij SMS
</div>
<div class="clearfix"></div>
</div>
</script>
ng-repeat creates a new scope for each element, ng-include also creates a new scope.
In the case of nodes_renderer.html, you use subItem which is inherited from your parent scope when you specify ng-repeat="subItem in item.children". That's why it works for nodes_renderer.html
How do I pass subItem variable to row_renderer.html?
Try onload="subItem=$parent.PropertyToPass" :
<div ui-tree-handle class="row" ng-include="'row_renderer.html'" onload="subItem=$parent.PropertyToPass">
For more information: How to get parent element inside ng-include when iterating in ng-repeat recursively

Foundation 5 and Equalizer

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

Foundation 4: Use rows in orbit slider

I am using Foundation 4 with the Orbit slider.
I want to use it as a content-slider.
Is it possible to put the rows from foundation in the orbit slider without messing up the margins from Orbit?
<ul data-orbit>
<div class="row">
<div class="large-7 small-12 columns">
<h1>Hallo</h1>
</div>
</div>
<div class="row">
<div class="large-7 small-12 columns">
<h1>Doei</h1>
</div>
</div>
<img src="img/slider/1.jpg">
</ul>
There are 3 slider-items. 2 divs with row classes and 1 full-width image.
This example messes with the margins from the class row.
I want to add margins so the divs with row classes will align in the middle.
I'm not sure I understand your question well, but if you want 3 slides (2 with text on the middle of the large screen and 1 with the image) I think this code should work (however I didn't test it):
If you add the .large-centered classes to the <li> tags, they will align the texts to the middle automatically, and you don't have to care about the margins in css.
<div class="row">
<div class="large-12 columns">
<div class="orbit-container">
<ul data-orbit="">
<li class="row">
<div class="large-7 large-centered small-12 columns"><h1>Hallo</h1></div>
</li>
<li class="row">
<div class="large-7 large-centered small-12 columns"><h1>Doei</h1></div>
</li>
<li><img src="img/slider/1.jpg" alt=""></li>
</ul>
</div>
</div>
</div>