Possible to add offset to the right of an element in a Zurb Foundation 4 grid? - offset

According to Foundation's docs on the grid component, I can essentially make 1 or more grid columns a space using their offset classes:
<div class="row">
<div class="large-1 columns">1st column</div>
<div class="large-9 large-offset-2 columns">2 spaces to the left of this column</div>
</div>
That will make 1 column, then 2 columns of plain space and the 9 columns. Is it possible to make those offsets to the right of an element instead of the left? For example, something like this?
<div class="row">
<div class="large-1 columns">1st column</div>
<div class="large-9 large-offset-right-2 columns">2 spaces to the right</div>
</div>

Assuming I understand your request correctly, it sounds like you just need to use end instead of offset. For example,
<div class="row">
<div class="large-1 columns a">1st column</div>
<div class="large-9 columns end">2 spaces to the left of this column</div>
</div>

Related

Remove ce-wrappers of fluid cObject

I masked(mask-extension) a couple of plug-ins. When the image is generated in the template, it is always wrapped in following divs:
<div id="c63" class="frame frame-default frame-type-image frame-layout-0">
<div class="ce-image ce-center ce-above">
<div class="ce-gallery" data-ce-columns="1" data-ce-images="1">
<div class="ce-outer">
<div class="ce-inner">
<div class="ce-row">
<div class="ce-column">
<figure class="image"><img class="image-embed-item"
src="fileadmin/user_upload/bla" width="975"
height="678" alt=""></figure>
</div>
</div>
</div>
</div>
</div>
</div>
Is there any way to remove all those wrappers? I simply want to have the image.
Sidenotes:
1. f:image does not work, I cannot access the proper uid for it to show. (This is perhaps an issue with mask)
2. I cannot find the tt_content.stdWrap.innerWrap > in my typoScript, as I do not know where mask puts it. It is neither in the netup.ts nor in the NewContentElementWizard.ts
You need to overwrite the fluid_styled_content partial in Resources/Private/Partials/Media/Gallery.html.
How to overwrite, you can read here: https://docs.typo3.org/typo3cms/extensions/fluid_styled_content/8.7/Configuration/OverridingFluidTemplates/

Bootstrap 4 - Image overflows from column when the window is resized

Bootstrap newbie here.
I'm trying to bootstrapify an old page but I can't seem to figure out how to stop my image from overflowing to the next column. I have a row with two columns- with the left side containing a picture. As soon as I reduce the window width, my image will start overflowing to the right column and will eventually collapse on top of the right column. I would like for the left column width to remain static or collapse to the top of the right column until the image can no longer fit in the left column.
I've tried adding the image-responsive class to the image but that will only change my image dimensions and I would prefer the image to keep its dimensions. Any help would be greatly appreciated!
Here is my code: https://www.codeply.com/go/fb14u8fsSc
Is it something like the one below you are looking for?
A couple of notes though:
It might be because of your simplified codeply example, but you use <div class="row"><div class="col-md-12">…X…</div></div>, which is the equivalent of …X…. That simplifies things.
We are talking about Bootstrap 4 here (you also use that in your codeply), but the .img-responsive class is from Bootstrap 3. That class is called .img-fluid in Bootstrap 4.
Regarding inline-style margins, I would suggest to use the spacing utility classes instead.
<div class="container-fluid" style="position: fixed">
<div class="row">
<div class="col">
<div class="card my-3">
<div class="card-header"></div>
<div class="card-body">
Insert name here<br/>
<img src="https://dummyimage.com/188x225/000/fff" class="XXXimg-fluid" alt=""/>
</div>
<div class="card-footer"></div>
</div>
</div>
<div class="col-md-9">
<div class="card text-xs-center mt-3">
<div class="card-header"></div>
<div class="card-body"></div>
</div>
</div>
</div>
</div>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" rel="stylesheet"/>

append div to specific place inside divs block with jquery

for sure its the easiest thing...
i need to append a certain div to a specific place inside a div block and after a specific div.
this is my code:
<div class="header">
<div class="logo">
<div class="ulWrap">
<div class="apple-logo">
<div class="android-logo">
<div class="mmBtn"></div>
<div class="mmBtnC"></div>
</div>
i need to insert a new div right after the:
<div class="logo">
i tried:
$('the div i want to append').eq(0).appendTo('.header');
but it appended it after the last div.
try after():
$('.logo').after('<div>some new div</div>');

How to handle Multiple DOM elements with iScroll (while using jQTouch)

I've my markups as
<div id="home" class="current">
<div class="header">iScroll</div>
<div class="wrapper">
<div id="scroller">
<ul id="thelist" class="plastic"><!-- li items --></ul>
</div>
</div>
<div class="footer">Footer</div>
</div>
<!-- Events Details -->
<div id="events">
<div class="header">iScroll</div>
<div class="wrapper">
<div id="scroller"> <!-- stuffsss --></div>
</div>
<div class="footer">Footer</div>
</div>
For iScroll (http://cubiq.org/iscroll) to work, I need the #scroller as ID (as per the javascript Code I'm using to initialize iScroll.
//for iScroll
var myScroll = new iScroll('scroller', {desktopCompatibility:true});
// Load iScroll when DOM content is ready.
document.addEventListener('DOMContentLoaded', loaded, false);
But since I can't have two different elements with the same ID (please notice I've got two elements with same id scroller in my markup above), some conflicts are there and the iScroll isn't working properly.
I want to be able to implement the iScroll on the markup by changing the id as classes. I tried to change them into classes and see if it works but I couldnt get it right.
Can anyone help me change the codes so that it works by implementing classes instead of the the id??
Rob is right, but you can change your code to scroller classes as you said.
Then initialise your scrollers within unique wrappers like this:
var scroll1, scroll2;
function loaded() {
scroll1 = new iScroll('wrapper1');
scroll2 = new iScroll('wrapper2');
}
I'm not totally clear on what you are trying to achieve but if you want two parts of your page to scroll I would suggest changing the IDs to be unique and instantiate two iScrolls with the different IDs.
I am sure you have figured it out, but for other users still struggling with similar layout (multiple scrollers) and want to make them work. Here is the answer from other thread
https://stackoverflow.com/a/7584694/1232232
but for this to work you need to assign ID's to your classed (div containers)
like
<div id="home" class="current">
<div class="header">iScroll</div>
<div id="wrapper-1" class="scrollable">
<div class="scroller">
<ul class="thelist" class="plastic"><!-- li items --></ul>
</div>
</div>
<div class="footer">Footer</div>
</div>
<div id="home2" class="current">
<div class="header">iScroll</div>
<div id="wrapper-1" class="scrollable">
<div class="scroller">
<ul class="thelist" class="plastic"><!-- li items --></ul>
</div>
</div>
<div class="footer">Footer</div>
</div>
Note: Remember not to assign same ID to multiple elements, always use classes for that purpose.

Expression Engine: split entries into groups

Quick question: How can I output all entries from a given channel into groups of 4, like so:
<div class="entry_group">
<div class="entry" id="1"><span>{title}</span></div>
<div class="entry" id="2"><span>{title}</span></div>
<div class="entry" id="3"><span>{title}</span></div>
<div class="entry" id="4"><span>{title}</span></div>
</div>
<div class="entry_group">
<div class="entry" id="5"><span>{title}</span></div>
<div class="entry" id="6"><span>{title}</span></div>
<div class="entry" id="7"><span>{title}</span></div>
<div class="entry" id="8"><span>{title}</span></div>
</div>
Thanks in advance!
You can try using the Modulo Operator plugin to acheive this with any number of entries. Something like this:
{if count == "1"}
<div class="entry_group">
{/if}
{if '{exp:modulo dividend="{count}" divisor="4"}' == 0}
</div>
<div class="entry_group">
{/if}
<div class="entry" id="{count}"><span>{title}</span></div>
{if count == total_results}
</div>
{/if}
The plugin is for EE1 only, but converting a plugin from EE1 to EE2 is a breeze.
I found another, much simpler solution on the ExpressionEngine forums; while fairly basic I think it should accomplish the desired goal fairly easily: http://expressionengine.com/forums/viewthread/197240/#927740
The jist of it involves using the {switch} variable to optionally insert closing and opening tag pairs after every n group of entries, depending on how many blank spots you leave in the switch. In your case, the example would be something like this:
<div class="entry_group">
{exp:channel:entries}
<div class="entry" id="{switch='1|2|3|4'}"><span>{title}</span></div>
{switch='|||</div><div class="entry_group">'}
{exp:channel:entries}
</div>
The whitespace between the div and class=entry_group shouldn't cause any issues, but if it does you may want to use CSS to control the properties of the containers without having to put a class on them (e.g. .entry_list>div{... and .entry_list>div .entry{...
I did find a semi-solution on the Expression Engine forums, but it requires a limit on the total number of entries.