-1

Trying to get a site to render with different css using the Adapt.js Adaptive css. Site is using php and the 960 grid. I'm just starting with the header only while testing. Got my JS and CSS in the right places. This is on my local pc for development - not on live server.
Here is my adapt.js code in the header. Not sure path is correct, please advise. I have a virtual host setup named mysite.local which points to the htdocs folder shown in my path. Thank you!

  <script type="text/javascript">
  // Edit to suit your needs.
  var ADAPT_CONFIG = {
  // Where is your CSS?
  path: 'c:/dev/sites/mysite/htdocs/css/adapt/',

  // false = Only run once, when page first loads.
  // true = Change on window resize and page tilt.
  dynamic: true,

  // First range entry is the minimum.
  // Last range entry is the maximum.
  // Separate ranges by "to" keyword.
  range: [
    '0px    to 760px  = mobile.min.css',
    '760px  to 980px  = 720.css',
    '980px  to 1280px = 960.css',
    '1280px to 1600px = 1200.css',
    '1600px to 1920px = 1560.css',
    '1940px to 2540px = 1920.css',
    '2540px           = 2520.css'
]
};
</script>
Dan M
  • 13
  • 2

2 Answers2

2

Although I havn't use Adapt.js.

But I think the path in ADAPT_CONFIG can not be system path.

It must be the web path. such as "/static/css", 'assets/css/'

pnuts
  • 276
  • 1
  • 5
0

You should use a relative path. A reference to c:\ is invalid. And even if you add file:/// to your path, it won't work because it is a reference to the client computer.

Example:

var ADAPT_CONFIG = {
  path: 'Stylesheets/',
    dynamic: true,
    range: ['0px    to 760px  = mobile.css',
            '760px  to 980px  = 720.css',
            '980px  to 1280px = 960.css',
            '1280px           = 1200.css']
};
Anders Nygaard
  • 5,433
  • 2
  • 21
  • 30