Include Page | ||||
---|---|---|---|---|
|
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The mark-up and classes used to produce this layout: {code:html}
Ex.2:Elementswithmarginsextendingoutsideofcontainercontainer
The mark-up and classes used to produce this layout: {code:html}
With }}
h4. Ex |
Wiki Markup |
---|
{html}
<div class="fix-demo">
<div class="fl-fix">
With fix applied.
<p class="fl-force-left"><strong>This text should be within the border.</strong>
<br />Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Pellentesque egestas risus malesuada sem consectetur eget congue massa ultricies.
Ut dictum facilisis odio, nec rutrum diam ornare id. Integer eget placerat tellus.</p>
</div>
<div class="fl-push"></div>
</div>
{html} |
The
mark-up
and
classes
used
to
produce
this
layout:
{code:html}Code Block | ||||
---|---|---|---|---|
| ||||
<div class="fl-fix">
With fix applied.
<p class="fl-force-left"><strong>This text should be within the border.</strong>
<br />Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Pellentesque egestas risus malesuada sem consectetur eget congue massa ultricies.
Ut dictum facilisis odio, nec rutrum diam ornare id. Integer eget placerat tellus.</p>
</div>
{code}
h4. |
Ex.
2:
Elements
with
margins
extending
outside
of
containercontainer
Wiki Markup |
---|
{html}
<div class="fix-demo">
<div class="fl-fix">
<h2>With fl-fix on the container, the container is made larger.</h1>
<p>The container is now extended to properly encapsulate the margins of the contained elements.</p>
</div>
</div>
{html} |
The
mark-up
and
classes
used
to
produce
this
layout:
{code:html}Code Block | ||||
---|---|---|---|---|
| ||||
<div class="fl-fix">
<h2>With fl-fix on the container, the container is made larger.</h1>
<p>The container is now extended to properly encapsulate the margins of the contained elements.</p>
</div>
{code}
h3. |
fl-fix
vs.
fl-clearfix
In
some
cases,
fl-fix
will
cause
scrollbars
to
appear
around
the
container
div
-
it
happens
when
the
width
of
the
contents
goes
beyond
the
container's
expected
width.
fl-clearfix
will
achieve
the
same
result
as
fl-fix
but
without
causing
scrollbars.
Also
in
other
cases,
fl-clearfix
will
clear
a
div
too
far,
for
example
if
the
container
div
lives
within
a
column,
it
could
be
cleared
below
it's
neighbouring
column.
In
this
instance,
fl-fix
will
work
best.