Solved

How Does .affix work using Bootstrap CSS?

Posted on 2014-01-12
5
1,585 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…

790 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