RSS Feed

February, 2010

  1. Site Design: The Basics

    February 24, 2010 by Austin Hallock

    So, to start, I’m going to say that this all might be confusing, if you need help with something, post it in the comments and I’ll get things worked out for you.

    When coding, I don’t use tables or tags like <font> (which most people tend to use). Why? Because the code can get really jumbled with that (you should see some of the stuff I have to deal with working on ILoveHits).

    Not only that, but all the <font>, border=”0″, a ton of stuff that can be done with CSS is considered deprecated.

    But most importantly in the new version of HTML (HTML5), the following WONT WORK:

    With that said, I generally use <div>’s, <span>’s, <ul>’s and <p>’s the most, and tack on a class=”whatever” so it looks like <div class=”classname”>Content</div>

    • <div>‘s are essentially just blocks, or squares, in your webpage.
    • <span>‘s are kind of like <div>’s but they don’t cause a line break.
    • <ul>‘s are unordered list, so essentially, when used with <li>’s you can create bullets
    • <p>‘s are a paragraph…basically like a <div> but it adds some margin to the top and bottom.

      is the same as <div>

    You have a few options for CSS…One you can have an external .css file and link to it with:

    <link type='text/css' href='mycssfile.css' rel='Stylesheet' />
    

    Or…You can have it internally in your .html file with:

    <style type='text/css'>
    	CSS goes here
    </style>
    

    And finally you can specify it for certain tags with style=’whatever’ so:

    <div style='font-size:10px;'></div>
    

    With the first two options, you can use 3 different things to change how your page looks.

    The first is using the element type, so if I want all <div>’s to look the same way I would do:

    div
    {
    	font-size: 14px;
    	background-color: #111111;
    	color: #ffffff;
    }
    

    The second option is to style certain classes (where you define <div class=’whatever’> To do this, you put a period before the class name in the css:

    .whatever
    {
    	color: #333333;
    }
    

    Finally, you can style based on id‘s. While classes can be used on multiple elements, id’s can only be used on 1 element. To style something like <div id=’whatever’> you would use a octothorpe (or for regular people, a pound sign):

    #whatever
    {
    	font-size: 30px;
    }
    

    You’ll notice I use stuff like #333333 these are hex codes that represent specific colors, you’ve probably seen them before. To find which color is associate with which hex code, you can use a tool like this (also, feel free to take a look at the source of that to get a further look at CSS and HTML).

    Let’s start off with some of the more basic CSS uses. Since you wont be able to use <font color=’green’> in HTML5, you’ll have to use CSS like below.

    Fonts

    Sure, Times New Roman does just fine for writing a letter, or paper, but when it comes to web design, 99% of the time you want to use a sans-serif font. What does sans-serif mean? Well, no serifs, hard for me to explain but this link should do the trick. The font faces I generally use are Helvetica Neue, Helvetica, Verdana, Lucida Grande and sometimes Arial.

    So how do you change your font? That’s easy … This series involves the use of CSS, simply because it’s what’s considered valid rather than <font _____>Text</font> (which is what most people tend to use). You can put it in any of the forms I have above.

    CSS:

    font-family: 'Helvetica Neue', helvetica, verdana, arial;
    

    The reason I have 4 listed, is if the person viewing your page doesn’t have the first font installed, it goes to the 2nd, then the 3rd etc.

    As for font sizes and colors, you put those in the same way you do the font face/family. The code for these are:

    font-size: 14px;
    

    and

    color: #111111;
    

    To pick a color

    To summarize, what I would do for fonts is make a class by doing:

    <style type='text/css'>
    .big_green_font
    {
    	font-size: 40px;
    	font-color: green;
    	font-family: helvetica, verdana, arial;
    }
    </style>
    

    Then, in my code I would use something like <span class=’big_green_font’>My text</span> to have big, green font.

    Background Colors

    Generally, you’ll want to associate a background color with a >div< (block/box) or <p>. To do this, you’ll use the CSS:

    background-color: #111111;
    

    So create a class:

    <style type='text/css'>
    .black_box
    {
    	background-color: #000000;
    	color: #ffffff;
    	width: 500px;
    	height: 200px;
    }
    </style>
    

    Then make your div: <div class=’black_box’>My content<>

    With each post in this series I’ll get a bit more advanced, so keep checking back! The next post will probably deal with dimensions, padding and margins. Again, if you have any questions, post them below.


  2. Lookin’ good – Intro

    February 20, 2010 by Austin Hallock

    How to succeed in building a successful website…The most important part is the site design.

    Well, that’s just my opinion — based on past experiences (and the reason Mike and I have launched successful sites). And this is coming from a programmer (though I dabble in design).

    I’m going to be starting a series of blog posts that will go into how to make your pages look better using CSS.

    So…what’s good looking?

    This is
    This isn’t

    Of course, you might already know that, so the next couple posts of mine will go into the various tips and tricks to making something look good! It’s not just the physical appearance that matters either, the transitions between pages, and effects you have on each page plays a big part as well.

    Let’s take a look at a splash page Mike Gartner just put out yesterday: Secret X. That page has only been rotating in Thumbvu, yet it’s gotten over 50 subscribers in 24 hours.

    Why? It’s not because of the content, he doesn’t mention anything about what his secret project is … it’s due to how sexy the page looks. Sure it’s simple, but it stands out.

    By the end of this series you’ll be able to make a page like that (and more) with ease.


  3. Even Shorter URLs

    February 17, 2010 by Austin Hallock

    So, I went ahead and bought the domain trkr.com and put up the link shortening/cloaking script from this post.

    Screenshot

    I’ve noticed, no one is using the tracker script other than me, and I figured that might be because you have to upload the script and change permissions. That or I don’t have many readers ;)

    So if you’d like to use the URL trkr.com to shorten/cloak your links, you are welcome to! All you have to do is drag the link below into your bookmarks.

    Shorten

    Each time you want to shorten/cloak a page, just visit the page and click that bookmark. It’ll display the URL for you to use in the top right corner! The URL will look something like: http://trkr.me/9


  4. A Simple “Tweet This” Form

    February 17, 2010 by Austin Hallock

    Twitter no longer allows basic authentication so this no longer works.

    Want your readers/members to have the ability to retweet some of your content? It’s a great way to spread the word and has worked wonders for ThumbVu.

    I’ve made it as EASY as possible for you to do this.

    All you have to do is put the below code where you want the Tweet This box to show, and that’s it! Of course, you’ll probably want to change the content of the tweet, so just change what’s in between the quotes after var tweet_content, so var tweet_content = “Your content”;. A couple rules for that, DO NOT start a new line, and if you put in quotes put a backslash \ before them. Also note that Twitter has a character limit of 140.

    <script type='text/javascript'>
    var tweet_content = "Want an easy way to add a \"Tweet This\" box to your site? http://austinhallock.com/short/16";
    </script>
    <div id='tweet_this' style='display:none;'></div>
    <script type='text/javascript' src='http://www.austinhallock.com/tweet_this.js'></script>
    

    You can see an example of this below. (If you’re in an RSS reader, this probably won’t show, so click here to see it.

     

    Pretty cool huh?

    If you want a bit of customization, you can add the following after var tweet_content = ‘whatever’;. The first will change the background color of the box, the second will change the font color.

    var tweet_bgcolor = '111111';
    var tweet_color = 'EEEEEE';
    

    You can also allow the users to change what’s in their tweet by adding:

    var tweet_textarea = 'T';
    

    As always, let me know what you think!


  5. Custom shortened/cloaked URLs

    February 13, 2010 by Austin Hallock

    OH SO TINY

    I’ve always just used bit.ly for my URL shortening and cloaking, but I figured it was time to create my own service for this.

    Of course, with you all in mind, I made it where anyone can use it, and made it dead simple to install. Here’s what you do (There’s a video at the end of this post if you don’t like reading).

    First, download the zip file below. It’s just a folder with one file: index.php. Unzip the folder, rename to whatever you want your URLs to look like and upload it to the main directory of your site. If you want your URL to show up as http://domain.com/likes/1234 then rename the folder to “likes”.

    Click here to download

    Make sure the folder has the permissions 777. You can see how to do this in the video below.

    Visit this page (it’ll be http://www.YOURDOMAIN.com/FOLDERNAME/). It will give you a link that you need to drag into your bookmarks bar.

    Every time you want to shorten a page, just click that bookmark and a window will show up giving you the shortened link.

    Each time your link it clicked, that’s logged, so this also works as a tracker to see how many people are clicking your links!

    Click here to view a video on how the whole process works.

    Let me know what you all think, and any suggestions for how I can improve this.