Setting up the Gumby Framework: A Step-by-Step

As I begin to delve into learning a Responsive CSS Framework, I've decided to do a comparison between Foundation 4, Gumby, and Bootstrap on my own.

I had success running Foundation 4 and Bootstrap, but unfortunately Gumby didn't cooperate.

Upon including the framework files, my web page just kept loading endlessly. After some investigation, I discovered that the issue lies with the inclusion of gumby.css

<html>
    <head>
        <link rel="stylesheet" type="text/css" href="css/gumby.css">
        <title>
            Title
        </title>
    </head>
    <body>
        asd
    </body>
</html>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/libs/gumby.min.js">
</script><script type="text/javascript" src="js/libs/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/libs/modernizr-2.6.2.min.js"></script>

It seems likely that I may have included incorrect files causing this dilemma, does that sound plausible?

Answer №1

Your issue is clear to me. To resolve it, you must either run this on a live web server or adjust the // hrefs to http:// in both index.html and css/gumby.css. This adjustment will prevent the jquery/custom font http requests from taking too long to time out, enabling the fallback to local versions.

An observation: I noticed that you have eliminated many lines of code from Gumby's default template files. It would be advisable to retain them as removing those may lead to significant inconsistencies across various browsers. Below is the code snippet I typically use:

<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if IE 9]>    <html class="no-js ie9" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js" lang="en" itemscope itemtype="http://schema.org/Product"> <!--<![endif]-->
<head>
    <meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <title>Gumby - A Flexible, Responsive CSS Framework - Powered by SASS</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <meta name="author" content="humans.txt">

    <link rel="shortcut icon" href="favicon.png" type="image/x-icon" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">

    <link rel="stylesheet" href="css/gumby.css">
    <link rel="stylesheet" href="css/style.css">

    <script src="js/libs/modernizr-2.6.2.min.js"></script>
</head>

<body>



    <script>
    var oldieCheck = Boolean(document.getElementsByTagName('html')[0].className.match(/\soldie\s/g));
    if(!oldieCheck) {
    document.write('<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"><\/script>');
    } else {
    document.write('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"><\/script>');
    }
    </script>
    <script>
    if(!window.jQuery) {
    if(!oldieCheck) {
      document.write('<script src="js/libs/jquery-2.0.2.min.js"><\/script>');
    } else {
      document.write('<script src="js/libs/jquery-1.10.1.min.js"><\/script>');
    }
    }
    </script>

    <script src="js/libs/gumby.min.js"></script>
    <script src="js/plugins.js"></script>
    <script src="js/main.js"></script>

    <script>
    window._gaq = [['_setAccount','UAXXXXXXXX1'],['_trackPageview'],['_trackPageLoadTime']];
    Modernizr.load({
      load: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'
    });
    </script>

    <!--[if lt IE 7 ]>
    <script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
    <script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
    <![endif]-->

  </body>
</html>

Answer №2

Consider relocating modernizr to the beginning of the document, followed by jquery before the main and gumby.js files.

I'm not entirely clear on what you mean by "the web doesn't stop loading", but it seems to suggest that there may be an issue with JS being blocked.

It would also be wise to include the following snippet in the head section:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Answer №3

Upon downloading and extracting the files, be sure to check out the demo.html file located in the main directory. Within this file, you will find a comprehensive example showcasing the included css and main js libraries, as well as some validations for IE compatibility issues. Additionally, there are commented js modules that can easily be integrated.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Searching for elements in Selenium using Python without a specified name

Looking for some assistance here. I'm trying to use Selenium to access a search field, but it doesn't have a name or ID in the html code. How can I locate and interact with this search field using Selenium? View the HTML code snippet for the sea ...

What is the best way to extract text from a class using selenium?

<div class="class-one"> <div class="class-two"> lorem ipsum <div class="class-three"> <a href="https://yahoo.com" target="" class="btn btn--primary btn--purple " id="" title="find"><i class="fal fa-fw fa-file-word"></i>& ...

Flickering Button Displayed After Fade-In Animation

After scouring the internet for a solution, I still can't seem to figure out why my code isn't working. Whenever an element fades in on Safari, it quickly flickers or flashes white, almost like a rapid refresh is happening. I've tried vario ...

Attempting to store an array in a database while avoiding duplicate entries

English is not my first language, so I apologize in advance if my explanation is unclear. I am currently working on developing a game where each player is assigned a specific role. However, I've encountered an issue with repetitive numbers being inser ...

Attempt to apply border-bottom style results in negligible changes

I have a snippet of HTML that showcases a grid-like structure. It's mostly how I want it to be, but I would like the last three rows to have a dotted underline. I attempted to achieve this using the following styling: style="border-bottom:dotted; bor ...

Using a PHP variable to trigger the jQuery .show() function

I'm attempting to trigger jQuery .show() events based on PHP variables. Below is my PHP code (retrieved from a form submission on another page): $last_pic_displayed = trim($_POST["last_pic_displayed"]); if (strlen($last_pic_displayed) <= ...

A guide on accessing every element within a "div" tag that begins with a specified text

In my HTML document, there is a div element present. I am looking to retrieve all elements within this specific div that have id attributes beginning with a certain string (e.g. "q17_"). Is it possible to accomplish this task using JavaScript? If necess ...

Angular 2 is experiencing difficulty in loading the image

I tried following the steps outlined in this documentation to display an image for my checkbox, but it doesn't seem to be showing up on the user interface. I have read that using an image is necessary for creating a checkbox, so I'm confused as t ...

How can I restrict input to only numbers and one decimal point using JavaScript?

The following code I have is not functioning as expected: function validateInputValue(element) { var regex = /\D$/i; // Important: avoid white spaces in password if(regex.test(element.value)) { alert("Please check your input format"); e ...

What is the best method to eliminate a bizarre border from a text gradient in Safari?

There seems to be a bug with text gradients on Safari that doesn't exist on Firefox or Chrome. I am using Safari 13.0.5 and you can see the issue in the screenshot below. Screenshot displaying the problem I have been attempting to apply a gradient t ...

How to vertically center a card between a search bar and the bottom of the viewport using Bootstrap?

I'm struggling to center a card vertically between the search bar and the bottom of the viewport. Even after setting the body height to 100%, the content extends beyond the viewport, leaving white space that users can scroll into. I've attempted ...

Tips for changing the background color depending on the value

I am creating a table displaying the results of a tournament. Each team's final placement and original seeding will be listed. I plan to include a small bubble next to each team showing how their final placement compares to their initial seeding. To v ...

What steps can I take to prevent the div from exiting the screen during animations?

Hello, I am a novice in the field of web development and I am attempting to create a website where, upon loading it, a text with a typing animation will appear centered in the middle. Eventually, the remaining words in the div will be 'Nice Paws' ...

Is zone.js responsible for the issue of CSS not being rendered properly?

My print preview CSS is functioning properly in my current location after testing it on various browsers and computers. However, when accessed from a location in Japan, the CSS does not seem to work correctly, specifically affecting the <table>. Use ...

The integration of CSS into an HTML file is ineffective

I'm new to learning about html and css files, and I've been struggling with a particular issue for some time. I created these files, but I can't seem to apply the css to the html file: app.py from flask import Flask from flask import rende ...

JSP generates unconventional HTML output

I'm encountering a strange issue with one of my JSP pages. It seems like the HTML is not being fully rendered. The output looks like this: <html> ... <table> ... </table> <div id= So, the last line is exactly what ...

Using Bootstrap to Implement Special CSS Styles for Various Devices

Is there a way to implement specific CSS rules for different screen sizes using bootstrap? For example, on medium screens (md), can we set an element's left-margin to 10px and have it be 100px on small screens (sm)? Any guidance would be appreciated. ...

Guide to centering a Material UI Table on a webpage

Is it possible to center the <Table> within a fixed width <div>, and have a scrollbar appear when the browser is resized, while maintaining the fixed width of the <Table>? Thanks in advance. This is my current setup: <div> ...

What is the best way to include a variable or literal as a value in styled components?

When it comes to managing various use cases, I always rely on props. However, I am currently facing a challenge in changing the border color of a styled input during its focus state. Is there a way to utilize props for this specific scenario? Despite my f ...

Introducing Filterizr, the innovative gallery filter plugin with a unique mix filter mode

I am currently working on implementing the Filterizr plugin () into my project. I specifically require the mix filter feature as demonstrated on this tutorial page . Upon clicking the mix button, as shown in the screenshots, only orange and purple blocks ...