-
Why is it important to have design principles?
Design principles can unite a team and guide the evolution of a product. Having a set of cardinal rules for a team can be inspiring and tell you, your team, and stakeholders which direction they should be going when tough choices arise.
Read more... -
Why aren't my environment variables working in React?
Spent too much time trying to figure out why environment variables weren’t showing in my React app, so I thought I would document the solution for other developers to find. I had added some new parameters to my environment variables so that they could be used by my app. I made sure they were loaded up by the terminal that runs my development server, everything looked good.
Read more... -
How do I set up a conditional config with Jekyll?
I found that there are a few ways of getting your Jekyll environment to behave differently for development purposes. I would use the first method if I’m going to conditionally change a thing or two in my templates but if I needed to change any of the variables in my config file, I would say the second one has much more functionality.
Read more... -
How do I fix Liquid Exception undefined method error?
Went to start up my Jekyll server and got roadblocked by a little red error in my console. “Liquid Exception: undefined method ‘has_key?’…” …and then remembered I recently ran gem update that gave me a newer version of Jekyll that wasn’t compatible with the code on my site. Rather than update my site, I decided to go get the last compatible version of Jekyll.
Read more... -
How do I exclude paths in gulp?
One of the things that’s nice about gulp is that you can easily exclude paths when specifying the paths you would like to include by adding an exclamation before the path. The task below will include all scss files except if they are in the folder partials, since those will be included as needed.
Read more... -
How to hide elements on mobile when using Bootstrap3
I noticed my layout breaking a little bit in tablet responsive view and wanted “member login” to appear as “login” to save on space. An easy way of doing this is to wrap the word “member” in a span tag with the class .hidden-xs .hidden-sm or .hidden-md etc. This simply hides the element in that browser size.
Read more... -
Bootstrap menu button not working for you?
There’s a couple things you should know about the bootstrap menu icon, if it’s not working for you chances are one of these things is off.
Read more... -
How do I view the hidden Library folder on an external hard drive?
I couldn’t figure out how to view the hidden user library folder on Mountain Lion, part of the reason why is because there is a space in the name of my external hard drive. Having a space in the name is ok, here’s how I finally got it to work.
Read more... -
WordPress Plugin: Nivo Slider Loading Slow
Nivo Slider is one of the best slider tools available for WordPress … until you’ve had too much fun and suddenly have too many images in it. So what do you do when Nivo Slider takes too long to load? Add a single line of CSS, hide any image that doesn’t need to be displayed initially.
Read more... -
Nginx 504 Gateway Time-out in WordPress
I got this error after changing a template on one of the pages on my local machine, but as it turns out, the template had nothing to do with the time-out. It was just a delayed reaction. Some things I immediately tried was restarting nginx and also increasing the PHP memory cache to 64MB but neither thing worked.
Read more... -
What is the Error: Cannot modify header information… in WordPress?
Warning: Cannot modify header information – headers already sent by (output started at {PATH TO FUNCTIONS}:92) in /home/content/17/9436817/html/wp-includes/pluggable.php on line 881
Read more... -
How do I get the length of a JSON file?
First, you’ll have to create a properly formatted JSON file. Once you’re done with that, getting the current number of objects from that list is a piece of cake.
Read more... -
Where do I specify the language of my website?
According to W3C, you can add lang=”en” (for english) attribute to your HTML tag and this is still valid for HTML5.
Read more... -
Does HTML5 need an html tag?
No it is not REQUIRED but yes, we should still use it, allow me to explain.
Read more... -
What is the doctype for HTML5?
The first line of your HTML5 file should include a doctype, it is case-sensitive with html in all lower case. The doctype tells the browser which specific rendering mode to use and sets the guidelines for HTML validation. If you are writing HTML5, you’ll want to use the following tag:
Read more... -
How do I get an image to float on my website even when scrolling?
First you’ll want to put a DIV somewhere on your page and give it a class, for my example I’m going to call it floatingbanner.
Read more... -
How do I remove dotted lines around links in FireFox?
This can be done with CSS, you’ll need to change button to whatever class, tag or id you need to remove those dotted lines from.
Read more... -
Count Number of List Items with jQuery
So you want to know how many items are in that list:
Read more... -
How do I block Google Analytics on my local machine/testing environment?
You’ll need to add the google servers to your host file.
Read more... -
IE Displays White Space Above and Below A-Tag and Linked Images
I recently made a gallery with a bunch of image thumbnails laid out in multiple rows, each one linked to the larger image but when I tested in IE7 I noticed some white space in between the rows. The reason for this is that IE adds a default line-height of 16px, so if the images or navigation items or horizontal rules (whatever it may be) is smaller than that, you’ll have to manually set the css for this object like so:
Read more... -
How do I create a 301 redirect with PHP?
For old HTML files I’d typically create a 301 permanent redirect with apache by editing the .htaccess however when that isn’t an option, I use a meta redirect in the head tag like so:
Read more... -
Why am I getting “jQuery is not defined” Error in WordPress?
It sounds like your script is being loaded before jQuery, a couple of things will help you fix this:
Read more... -
How do I pull in data from a JSON file?
Now that you’ve created a JSON file, you’ll want to use that data somewhere.
Read more... -
How do I kindly tell my users to upgrade from IE6?
It’s almost impossible to get every site working properly on IE6 and with the way it renders HTML & CSS what developer in their right mind would even want to try? I wrote a little HTML & CSS to target users on IE6, in hopes that some of them will upgrade to something a bit more current.
Read more... -
How do I create a new database and import .SQL file?
Open Terminal & Login.
Read more... -
Fix for ERROR 1049 (42000): Unknown database…
I was trying to import a new database but kept getting this error ERROR 1049 (42000): Unknown database ‘MYDATABASE’, finally got it fixed… the error wasn’t with the syntax it was how I exported my database.
Read more... -
How do I delete a MySQL database?
To delete a database, open terminal and login to your MySQL, if you don’t have a password leave it blank. If your default user isn’t ROOT you’ll want to change that to your id =]
Read more... -
How do I style a horizontal rule HR tag with CSS?
Here’s how you can style the Horizontal Rule tag with CSS. Just a note, the default of an HR tag is 100% wide, 2px high (1px for line the and 1px for a border to give the line a 3D effect).
Read more... -
Why do linked images display white space in between with IE7?
If you ever tried to display a row of linked images in a row, you may notice some white space in between them when viewing in Internet Explorer 7, this is because IE7 adds a default line-height of 16px which, in the case of seeing whitespace isn’t what you need.
Read more... -
What is the proper format of a JSON Array file?
Well let’s start off by understanding what JSON is, JavaScript Object Notation. It’s a derivative of JavaScript that allows data to be passed between a server & a website in the form of objects. It’s similar to XML, except the JSON syntax is less invasive than XML and so it ends up having a bit of a smaller file size.
Read more... -
How Do I Grant Permissions on MySQL?
Open Terminal
Read more... -
How do I create a new branch in git?
Open up your terminal and navigate to your website directory.
Read more... -
How can I make textarea grow without breaking the horizontal layout?
Depending on the audience, letting users resize an input box isn’t always the best option, in addition, resizing in any direction can break a layout. That’s why I prefer this auto-resizing jQuery plugin
Read more... -
How do I export a database using phpMyAdmin?
Everyone’s setup is different so first you’ll have to get to the phpMyAdmin section on your web hosting server. With Dreamhost it was easy, under “Goodies” click “MySQL Databases” and then in the right column you’ll see a link for PHPMyAdmin, click that and login.
Read more... -
How do I list databases in MySQL?
To list database type the following command
Read more... -
Why do resized images in IE7 look pixelated?
When using width or height properties to resize images, IE will render a dirty pixelated image unless you correct the rendering type with CSS.
Read more... -
Why do nested html paragraphs break CSS?
I tried something silly today… to find that it didn’t work, here’s what:
Read more... -
Fancybox no longer works on IE7 since jQuery Upgrade
Looks like there may have been a little bug in the first release of jQuery 1.6 so all you have to do is install the update 1.6.1. You shouldn’t have to fix any other code to get your fancybox back up and running.
Read more... -
Why does text-align center only work inline and not from a css stylesheet?
I started thinking I was crazy when my text-align center worked inline but not when I added it to the stylesheet, this was due to the order in which the CSS loaded. The center property was being over-written by a left property somewhere else so adding !important fixed it right up.
Read more... -
Why isn’t my CSS class working in hover or active state of a link?
One of the reasons your active or hover state isn’t working is because there is actually a particular order for pseudo-classes (link, visited, hover, active) in CSS. If they aren’t in the proper order, they won’t work.
Read more... -
What does adding a slash do in the font property for CSS?
This is actually a shorthand for font size (first metric) and line-height (second metric) and font-family.
Read more... -
How do I use CSS shortcuts for background image?
Here it is, the background properties all in one line – glorious.
Read more... -
How can I fix clear type bug in IE7 cause by JQuery fadeIn & fadeOut?
Before fading completing fadeIn, remove the filter attribute but I can’t fix the filter on fadeOut. I’ve tried everything, I’m just not sure how to do it…
Read more... -
How do I remove the bullet in list items with CSS?
Just when I thought I had removed the bullet… I found it still there in IE7. Best way to remove the stupid thing once and for all is to add list style type to both the UL and LI items.
Read more... -
How do I make my first git commit?
Started using git to backup for the code on my website, here’s how I made my first commit =]
Read more... -
How do I link to from one part of an HTML page to another?
This would be called using an HTML anchor tag and there are two parts to doing this.
Read more... -
How do I create a global variable with Javascript?
Global Variable vs. Local Variable
Read more... -
How do I create & add a favicon to my website?
There are two ways to do this.
Read more... -
How do I get Internet Explorer 7 to display z-index ?
The ticker bar lower shadow displayed perfectly in Safari, Chrome & Firefox, but IE didn’t show it.
Read more... -
How do I fix edgy text in FireFox from JQuery’s fadeIn() & fadeOut?
If you are noticing a problem with text appearing light, crunchy or edgy in FireFox while fading in and out, you’ve found the cleartype bug! You’ll have to remove the filter property from the DOM. Try this:
Read more... -
How do I fix rough edges of text in Internet Explorer (IE7) with jQuery’s fadeIn() & fadeOut()?
You may have noticed some cruddy black dots surrounding text or what looks like a black outline or border when fading in and out with Internet Explorer 7. This is actually a bug but before you go crazy, here’s the fix.
Read more... -
How do I include one file in another with PHP?
This is my favorite approach to including one file in another, but it means your server has to be running PHP and all of your file names need to be named .php instead of .html. If you’re not sure if your web hosting runs PHP you’ll have to check with them otherwise you can follow these instructions to see if it works.
Read more... -
How do I include one HTML file in a another with HTML includes.
I recently used HTML (Server Side) Includes to convert an old iFrame site into a table-less iframe-less site. Here’s a quick bit on how to do this.
Read more... -
How do I make images flexible height and width?
This is easy stuff.
Read more... -
How do I define multiple CSS attribues in JQuery?
You can string up your classes this way.
Read more... -
Can a span have a width?
Yes. Since a span tag is an inline element and it has “display:inline” as default, it doesn’t naturally have a width.
Read more...