SteveHinesley.com

My Personal Technical Resource

HTML

How to use custom fonts in your HTML with Google Web Fonts

Google has made adding custom fonts to your web pages very simple. You no longer need to find a public domain font, download it, convert it, and then upload it to your site. Plus, it only takes a simple edit to change the font. First go to Google Web Fonts and choose the font(s) you [...]

Posted in CSS, Fonts, HTML, Tutorials | No Comments »

Web-safe fonts with CSS

Web-safe fonts is a common problem that I run into when cleaning up web pages for customers. My primary goal when cleaning up or rewriting a web page is to try and make things consistent across all platforms and browsers. This is easier said than done in many cases. Not only are bad font declarations [...]

Tags: , , , , , , ,

Posted in CSS, Fonts, HTML | No Comments »

Make a full screen <div> overlay that does not move when the page scrolls

If you need to make a full screen div overlay to load a popup, like a system modal dialog or an animated loading image and want to keep it full screen without it moving with the scroll bars, there is a simple solution. You just need to add the correct CSS to lock the <div> [...]

Tags: , , , , , , , , ,

Posted in CSS, HTML | No Comments »

JavaScript event attributes generate a W3C Validation error with XHTML

When validating you XHTML document against an XHTML DTD, are you finding that the JavaScript event attributes generate a W3C Validation error? The answer is likely very simple. XHTML expects all tag names and attributes to be in lowercase. Most examples you are likely to find on the Internet will show the HTML version of [...]

Tags: , , , , , , , , ,

Posted in HTML, Javascript | No Comments »

Add a Facebook like button with comments to a web page

If you would like to add a Facebook like button with user posted comments, it’s very easy. Just follow these simple steps. Log into your Facebook account. Click HERE to “Create an App” on Facebook. (Drop the ‘http://’ from the Site URL field, but add a trailing ‘/’) After the app is created, record (or [...]

Tags: , , , , , , , ,

Posted in HTML, Tutorials | No Comments »

Copy and paste HTML select with all of the states

I use this code frequently but I just copy it from any random site, so I decided to make it available here. <select name="State">  <option value="" selected="selected">Select a State</option>  <option value="AL">Alabama</option>  <option value="AK">Alaska</option>  <option value="AZ">Arizona</option>  <option value="AR">Arkansas</option>  <option value="CA">California</option>  <option value="CO">Colorado</option>  <option value="CT">Connecticut</option>  <option value="DE">Delaware</option>  <option value="DC">District of Columbia</option>  <option value="FL">Florida</option>  <option value="GA">Georgia</option>  <option value="HI">Hawaii</option> [...]

Tags: , , , , ,

Posted in HTML, Tutorials | No Comments »