Solved

How Does .affix work using Bootstrap CSS?

Posted on 2014-01-12
5
1,579 Views
Last Modified: 2014-01-12
I am trying to use Bootstrap to affix the map image on the left when the user scrolls 230px.  It isn't working at all.  Any ideas how to use .affix?  Here is the example:
http://therevolutionet.com/ION/BS3/affixMap.html
0
Comment
Question by:TrevorTomato
  • 3
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39774854
Change
<div data-spy="affix" data-offset-top="230">
to
<div data-spy="affix" data-offset-top="60" data-offset-bottom="200">

I have it working here http://jsbin.com/eZAKiDA/1/

Instructions with and without js http://getbootstrap.com/javascript/#affix
0
 

Author Comment

by:TrevorTomato
ID: 39774860
I updated my HTML and posted it here:
http://therevolutionet.com/ION/BS3/affixMap_Ace.html

But, not fixed.
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39774862
Looks like the real issue is you forgot to add jquery

Please see the link I have that contains all the files.
0
 

Author Comment

by:TrevorTomato
ID: 39774863
YEP!!  Thanks Ace!
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39774870
Doh!

I noticed the next issue is the image expands to original size when you scroll and it goes under the right side.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question