Archive for the ‘web development’ Category

Facebook ends support of Internet Explorer 6

Thursday, August 26th, 2010

Wow, this is great news. Finally, one of the largest viewed sites on the web says enough is enough! I completely applaud Facebook for announcing that they will no longer support Internet Explorer 6. I first found out this information from an article on PC World. As mentioned in this article Facebook recently announced that it will no longer support IE6, conveniently on September the 15th. After the 15th, they recommend that users try and find a new browser to use. I also just learned from this same article that Internet Explorer 9 will come out on the September 15th as well. Well, you don’t say? Now, the only thing that Facebook will not support in IE6 is their chat services, however the Facebook blog made it seem like IE6 was heading out the door.  From what I understand, Facebook chat is getting to be as popular as other services available, since everyone uses Facebook these days.

Anyways, I really like the fact the these two things are happening on the 15th of September. I would bet that Facebook will promote Internet Explorer 9 somehow and in some fashion, whether through ads, or in their blog posts. What not a better way to promote your new software than to have one of the leading web sites promote it as an upgrade of it’s older version. Microsoft is trying to do it’s best to complete with an array of other browsers out there such as Firefox, Chrome, and Safari. Most of these new browser also happen to support much of the new HTML 5 tags and attributes. I am reading that Internet Explorer 9 will support much of HTML 5 as well.

I hope that other companies stop supporting Internt Explorer 6 as well. It has been a very tough time in the past few years making CSS compatible with IE6 and doing hacks to support a browser that is several years old, with less than adequate security. I hope that other companies will be brave enough to announce that they will not support this version any longer. I personally do not think that people prefer to use Internet Explorer 6, I think that this is just a situation where there are too many older PCs out there surfing the net and unwilling or unknowing how to upgrade to a new browser. Who will it offend if everyone starts saying that their browser needs to be upgraded?

Anyways, I hope September 15th will be a great day for HTML 5 designers and developers out there. About time we all upgrade.

CSS Classes and IDs

Monday, May 3rd, 2010

CSS classes and IDs can be a very confusing subject indeed. The question seems to arise when do you use an ID and when do you use a class? For starters, for those of you that do not know what makes a style in CSS a class and what makes it an ID, the class always starts with a period. Classes and IDs are not intentionally saved for anything specific. Anything can either be a class or an ID, it just depends how you want to organize your CSS. Some web designers never use classes and only IDs, some designers only use IDs. By using both classes and IDs in an organized fashion, designers can really make their code flow well and make a site that is easier to change and adapt in the future.

.someClass {

}

The ID style type always startes with a number sign.

#someID {

}

So, when should I use a class over an ID or an ID over a class? In my opinion IDs are saved for those styles that are more or less for large unchanging items in your site that are at a higher level of importance such as headers, navigational, and footer DIVs. Containing DIVs are are a great place to use IDs also. The IDs act as the sound structure of the CSS, things that you would never want to change, or take great care in changing. Think of them as being part of a frame of a house, the plumbing, or the electrical box. These are things that you do not  want to change if at all possible down the road.

Classes are best suited for content styling that may have to be repeated several times. For example, a paragraphi style would be a good place for a class over an ID. Classes are also great for nesting. Nesting of styles is basically the act of placing a style within a style. Lets say you have a style called Heading1. This style might be a large red header that shows up on the top of pages. You might want to create a heading that is very similar to this style, however has a slightly different color. For example if you wanted to have a heading that was not as prominent yet had the same size and typeface (font). Creating a nested style would let you create a style based on another higher level style without having to write out all of the parameters again.

.heading1 {

font-family: verdana;

Size: 18px;

color: #cc0000;

line-height: 14px;

}

A nested style would look similar to this.

.heading p {

color: #663333;

}

You did not have to replace all of the style, only the color.

So how would you implement this in your code?

<div class="Heading1">Some Heading

<p>A different Colored heading</p>

</div>

Since you have already defined the div as a heading1, anything within the DIV under a paragraph tag will be a different color as stated above.

Anyways, this not only helps to lower the amount of lines in you CSS file, it also helps you create sub styles that are easy to manage.

Templates

The idea of having different classes and IDs that are nested are very helpful in creating templates. You could easily have a main tempalte set up and then several different other template styles that are based on your main template. Whole websites could look completely different if you have several different nested styles set up, based on your original template styles.

For example, let say you create a heading1 and you wanted three different options for users to choose from in your CMS.

.Heading1 {

font-family: Verdana;

font-size: 24px;

color: red;

}

.Heading1 template1

font-family: arial;

font-size: 36px;

color: blue;

}

.Heading1 template2

font-family: Times;

font-size: 36px;

color: Green;

}

You will notice that each of these are pretty different, however they could be the same place within the CSS layout of your template, so when displayed they would look totally different, however have the same structure that would not have to be changed. This is one of the beauties of CSS, the ability to create a style and then have several different options that all based on a higher level.

What is a query string?

Monday, January 18th, 2010

This post goes out to all of those people out there who have seen all of those numbers and letters jumbled up at the end of a URL that really do not make any sense. This is the query string, and it makes sense to web browsers! The query string always starts with a ? mark after the URL. After the question mark a query string has a parameter and value, e.g. color=Blue. This is a way for a link to call out to a web page that has .

Example:


http//scottlassiter.com/index.php?color=blue

This parameter will be sent through the query string and intercepted by a code within a web page that is usually hidden in the view source option. The web receiving web page has parameters that look for a certain parameter, e.g. color, and then parses what the value of that parameter is, e.g. blue.

So if I have a page that is looking for a Query String parameter of color=blue, then I may have a function to list all of the logos I have created that are classified as blue.

Each URL can have several parameters passed through the query string. To add another parameter, you add an ampersand & followed by the next parameter.

Example:


http//scottlassiter.com/index.php?color=blue&logo=3

This example would be calling for logo=3. In my code I could have a logo that is listed as 3, so that logo would show.

There are many ways to use the parameters and their values to extract specific data from a web page. Query strings give an easy way for links to communicate to websites to pull information. Next time you are on Facebook or twitter, check out the query string, it will show all kinds of interesting values. Some will look to make sense and others not. Hopefully this helps you understand the web a little more!

CSS text kerning for your web pages

Wednesday, July 22nd, 2009

Have you ever felt like you were limited in the things that you could do with your typography on a web page? I have, and before I knew what CSS was to apply a form of “kerning” to my web pages without having to create a custom text graphic. Custom graphical text is always going to look cooler, however for particular reasons you may not want to do a graphic for every time you create some text, such as a dynamic photo caption pulling from a database. Now with CSS3 becoming more browser compatible, the use of typography will begin to expand more and more.

The CSS parameter you want to use is called letter-spacing. Yes, it is that simple!

Anyways let begin. Lets say I want to have a caption for my photo that looks cool and well designed. The first photo caption is standard.

CSS Kerning tutorial

Our beautiful lake

Now Check this out!

CSS Kerning tutorial

Our beautiful lake

Doesn’t this look much better?

Anyways, here is the CSS
Take your text and wrap it in a <span> tag. This tag helps you apply a style to the text easily, however this is not the only place to use style. </span>

<span>Our Beautiful Lake</span>

Next add a style and the line spacing (int his example we are using Inline Styling, however the same styleing can be used in an external style sheet):
<span style=”letter-spacing: 5px”>Our Beautiful Lake</span>

The result is:  Our beautiful lake

It’s that easy! Hope this was helpful.

Again, there are many new features that are coming available in CSS3 that will enhance the ability of typographical design without having to create textual images and such. Please return to http://scottlassiter.com/blog in the future to learn more about CSS3 features.

How to refresh or reload an iframe that works in Firefox and IE

Monday, June 8th, 2009

Ever have a problem where an iframe that you have in your web page will just not refresh or reload? This is definately a problem if you have updated the source file of the iFrame, yet it does not show recent changes. How do fix this, with a little bit of Javascript!

All you need is just a few lines of code.

First set up your iframe:

&lt;iframe id="yourframe" src="yourframe.html" width="840px" height="3200px" frameborder="0"&gt;&lt;/iframe&gt;

Next drop this javascript above your body tag:

&lt;script type="text/javascript"&gt;
window.reload = refreshFrame;
function refreshFrame() {
document.getElementById('yourframe').src = "yourframe.html";
}
&lt;/script&gt;

What reloads the frame, its the window.reload call. By defining the id of the frame and calling it to window.reload will automatically reload the frame every time you refresh or come back to the page. Very easy and it works great. Good luck!