Archive for October, 2009
Web Design Tip #2 – Don’t annoy your visitors
Oct 31st
2.1: Autoplaying Sounds and Videos are distracting
Ever been to a page that starts playing music automatically when you load it? Either you’re already listening to music and you start hearing these other sounds interfering. Or you’re in a nice quiet room, didn’t realize your volute were up so loud, and then all of a sudden this video and sound starts playing super loud. This is extremely annoying. Also users on slow connections, may not like you wasting their time loading sounds and videos that they don’t want to listen to in the first place. Of course, if the main idea of your site is to play sounds or videos, then it’s okay to play them automatically. Take youtube for example; when somebody clicks on a video on youtube, they very well know that they are about to play a video. It’s the unexpected, and pointless sounds and videos that are the problem.
2.2: Animations and blinking text is amateur
How can anybody concentrate on reading your site when you’ve got a gif image and some big text flashing at them in the corner. It’s like trying to read something while somebody is yelling “Hey look over here!” every five seconds.
2.3: Scrolling text isn’t affective
Scrolling text slows your visitors down. They have to read at whatever speed you set. If they want to read it quickly, they have to sit there and wait for the text to move over enough to see it. Or they only catch the last half of the sentence and they have to wait until it wraps all the way around again to see the beginning.
2.4: Nobody likes pop-ups
Just think about it! Does anybody like seeing pop-ups ads all the time? Think about your visitors and how to make an enjoyable experience for them. If you want to advertise, do it on the page and not in a separate pop-up window.
2:5: Background images look stupid
A large background picture that is repeated over and over makes it so you have to squint just to read the text and on top of that, make your page load slower. This is annoying. Stick with simple backgrounds. Look at professional websites, none of them use large repeating picture backgrounds.
After I wrote all these tips I realized, these are exactly the reasons I hate MySpace. If you’ve ever visited a MySpace page, you’ve probably encountered most of these problems and seen how annoying they can be for the visitor. Remember to keep your visitor’s interests in mind when designing your site.
All about Inline CSS
Oct 30th
I feel like we’ve been neglecting Inline CSS… We’ve talked about classes and id’s and all sorts of good stuff but we’ve left good old Inline CSS out of the equation! So we’re going to talk all about Inline CSS today!
So as we covered in the Basics of CSS there are three different types of CSS that we can use. If you don’t know a whole lot about CSS then you can still read on!
- External Style Sheets
- Internal Style Sheets
- Inline CSS
If we recall, an External Style Sheet is a separate document called something like “mystyle.css” and it is something that we need to link the HTML document to.
An Internal Style Sheet is when CSS is within the head tags of an HTML document and Inline CSS is CSS that is within than HTML element. CSS is inserted into an HTML element via the style attribute. It will look something like the following:
<tag attribute="CSS">content</tag> <span style="color:#ff0000;">Red text</span>
Inline CSS is a blend of HTML and CSS, which means the rules for both languages applies! We need to write proper (X)HTML and proper CSS. If you are unfamiliar with the syntax rules for either of these then click here for XHTML OR here for CSS.
How exactly can we use Inline CSS?
The answer rests with how many properties you know how to use. You can use advanced positioning methods such as…
Note: if you aren’t familiar with these properties, needn’t worry. These are advanced techniques of positioning and they will be covered in later tutorials. This is purely for an exploratory purpose..
<a href="home.php"> <img src="images/home.png" height="50" width="100" alt="Home Page" style="position:absolute; top:15px; bottom: 35px;" /> </a>
So we can have insane positioning properties and Inline CSS with a dozen or so properties if we wanted. It all really depends on what you need/want to accomplish. Keep in mind that most of these tasks can be accomplished by using ID or class elements so Inline CSS is usually a last resort. Also, remember that ORDER COUNTS! External Style Sheets < Internal Style Sheets < Inline CSS. So External Style Sheets have the last priority when applying styles. Internal Style Sheets will override External Style Sheets and Inline CSS will override both External and Internal Style Sheets.
One excellent example of using Inline CSS is if you have a blog such as wordpress or blogger! If you’re writing posts then you’re using HTML and CSS whether you are aware of it or not! If you’re using wordpress and you’re using the visual tab for new posts and you just want to change the color of some text then you’re using Inline CSS (check the HTML tab to see)! Let’s say, for instance, you wish to change a certain amount of text to pure white. You could write the following:
<p style="color:white;">White text</p> <span style="color:#ffffff;">White text</span>
Remember that “P” stands for “Paragraph” and “span” doesn’t do anything unless you set it otherwise… So pure white text would look like this entire sentence!
<span style="color:#ffffff;">This was used to make pure white text</span>
Inline CSS and Links
What if you want to have a unique link on our page for some reason? Then we could easily use Inline CSS of course! How about this unique link?
Even though that link is extremely overdone, we can see how it differs from the other links on the page. Let’s examine this link we created.
<a href="http://atomicpages.net/blog/2009/10/25/all-about-inline-css/" target="_blank" style="font-weight:bold; text-decoration:overline; font-size:16pt; color:blue;">this unique link</a>?
So we have our link and we can see it is linking to a page (this post actually) and it is opening a new window OR tab (depending on your web browser settings) via target=”_blank”. Then we have our Inline CSS that is making the font bold, overline, large, and then finally blue in that order.
So we can see there are multiple ways we can use Inline CSS and use it effectively. Generally, Inline CSS is used for one-time occasions such as that fancy link we created. Perhaps you need that image to be up a pixel higher and you don’t want to impact everything else. Example:
<div id="img"> <img src="images/img.gif" height="16" width="16" alt="Img" style="position:relative; bottom:1px;" /> </div>
This will move this one particular image up by 1 pixel AFTER applying the id=”img” properties in the External Style Sheet OR Internal Style Sheet (remember order). It would be wise to keep the use of Inline CSS to a minimum and do as much as you can in an External or Internal Style Sheet; however, don’t be afraid to use it if you’re in a situation that calls for it! All about Inline CSS.
Web Design Tip #1 – Provide good content
Oct 29th
This is the start of a new series of web design tips. In each article, we’ll provide a new tip, that can be very useful in creating your website.
This first tip isn’t even exactly design, but that’s why it’s the first tip, it’s even more important than design.
The fundamental reason that a website exists is to provide something that is useful or provide some information that is of value to the visitor. If you are missing that important element from your page, you need to fix that before you worry about design. The content of the page is the number one most important thing on every web page. You could have the nicest looking page ever, but if it doesn’t provide something of value, nobody has any reason to visit it. Ask yourself: What is this page for? How can the page be used? Is it a waste of time for your visitors?
This also relates to advertising. Advertising can be a great way to make money, but don’t completely drown out the page by ads. It can be temping to try to cover your page almost entirely in ads in order to make the most money. But if you don’t have very much content of value, people will stop visiting the site and the end result will be less money from advertising. I recommend no more than a 25% advertising to 75% content ratio. Anything more than that, and the advertising takes away more from the page than it’s worth.
Basics of CSS – Part # 4-2
Oct 28th
font-weight
The font-weight property is an alternative way of bolding text. In HTML we have two elements that bold text:
<b>This is bold text</b> <strong>This is strong text</strong>
However, these two elements only bold our text one way and one way only. If we want a variety of bolded text then we would use the font-weight property. Here as possible values of the font-weight property:
- 100
- 200
- 300
- 400
- 500
- 600
- 700 (bold)
- 800
- 900
- normal
- bold
- bolder
- lighter
Off the bad 600 pops out as being different than the rest. This is because browsers will stretch out it for some reason.. If you want bold then use 700.
font-variant
The font-variant property is somewhat anti-climatic because the only value that is worth knowing is small-caps. Consider the following:
body {font-variant:normal;} p.fancy {font-variant:small-caps;}
By default all text within the body element will be “normal” unless you tell it otherwise. In p.fancy the text will be in Small Caps. And how fancy those small caps look!
Font, all-inclusive
Like some CSS properties, we also have the ability to declare everything and anything within the general font property. Here’s an example:
#font {font:italic 18px bolder Verdana, Geneva, sans-serif;}
So in order of execution, the font will be italicized first, then 18px, then bolded, and then changed to Verdana font! Also, remember what that pound sign is in front of a CSS selector? Of course! It’s the “ID” of an HTML element so…
<p id="font">Some italic, Verdana, 18px, bolder text</p>
Extra Goodies
Here are some extra goodies that you don’t commonly see! These properties are seldom used and I don’t believe they are standard yet..
font-size-adjust
To be perfectly honest, the only thing that I know about the so-called font-size-adjust property is that it changed the aspect ration of the font that you want. Usually there is a numeric value such as .5 or 1 instead of “inherit” or “none”. You could, for example, use something like the following:
.adjust {font-size-adjust:1;}
And how very exciting that is… This will also have an example in the zip archive. You can read much more about the font-size-adjust property by reading this w3c article.
font-stretch
The font-stretch property is pretty self explanatory actually. Possible values for this property are:
- ultra-expanded
- extra-expanded
- semi-expanded
- wider
- normal
- narrower
- semi-condensed
- extra-condensed
- ultra-condensed
Once again, this example will have to wait for the zip archive… But I’m not even sure it does anything or if any browser supports it.. Check out this w3c article for more information.
Click here to download a review of this entire tutorial and see some examples! (2.00 KB)
Basics of CSS – Part # 4
Oct 26th
In this tutorial we’re going to talk about fonts… Fonts are the most amazing thing ever invented on the face of the Earth! Note: all fonts that are mentioned in this tutorial are acceptable fonts to be used on a web page. Use of arbitrary fonts that some people might not have is not a good thing. That means when the browser renders the site and they don’t have the font, they cannot view it properly or as you intend them to. Please see this Wiki article on the core fonts to use on a web page for more information.
Font Property
I’m sure we have all opened a text editor such as textpad, notepad, or textedit. In fact, we’ve probably all opened something like Microsoft Office or OpenOffice that gives us the ability to choose different fonts, adjust the margins of a page, zoom into a page, change the font size, color, weight, and other variations of that font. In CSS, there is a font property that allows us to specify fonts to be used on a web page. We can do basic formatting of the font itself using this font property.
Differences of Fonts
This CSS font-family property allows us to choose a font family that will be used on our web page. There are two different types of font families in CSS.
- Generic Families
- Font Families
A Generic Family is a group of fonts that have the same look. Monospace type font is an example.
A Font Family is a specific group of fonts such as Arial or Times New Roman.
There are three things about fonts we need to be aware of:
- Serif Fonts
- Sans-Serif Fonts
- Monospace Fonts
Serif Fonts have small lines at the end of some characters. Most notably is the character of a lower-case “g” or upper-case “A”. An example of a Serif type font is “Times New Roman”, “Georgia”, and “Trebuchet MS”. Here are font examples:
Sans-Serif literally means “without serif”. So there are no small lines at the end of any characters. An example of a Sans-Serif type font is “Arial”, “Comic Sans MS”, and “Verdana”. Here are font examples:
Monospace means all character have the same width. So a capital “B” and lower-case “p” will have the same width and all spaces between character will be the same. Here are font examples:
font-family
Great! Now that we know the differences between fonts and such we can finally get to some CSS! So this so-called font-family property allows us to call a series of fonts. An example of this would look like the following:
body {font-family:font-family:Georgia, "Times New Roman", Times, serif;} p.fancy {font-family:Tahoma, Geneva, sans-serif;}
Note the use of multiple fonts. This is known as a fallback system for the browser… If someone doesn’t have the font “Georgia” for some wild reason then the browser will change the font to the next which is “Times New Roman”. And let us say that they didn’t have Times New Roman for some crazy reason then the browser would change the font to “Times” and so forth. Start with a font you want and then choose more generic fonts such as plain old “serif”.
font-style
The font-style property can be used in various ways. You can have three possible values.
- Italic
- Normal
- Oblique
Consider the following:
p {font-family:"Times New Roman", Georgia, Times, serif;} p.italic {font-style:italic;} p.normal {font-style:normal;} p.oblique {font-style:oblique;}
All text within the p element will be of the font family “Times New Roman” because of the font-family property. From there we have created three separate classes for p elements for the three values we can have for the font-style property. Our result will look like so:
Italic text, Normal text (what a surprise), Oblique text (what’s the difference?).
Using the italic value we get our italic text. Using the normal value we get out normal text — what a surprise there, normal text. Last but not least, using our oblique value we get oblique text.
Wait… What? It looks the same as the italic text?! Believe it or not, oblique text is actually different from italic text. Oblique text is slightly slanted to the right. Unlike italic text, Oblique text does NOT use a different glyph shape for each character. So for “Times New Roman” it will use the “Times New Roman” glyph but only slightly distorted. You can read all about the differences in this Wiki article on Oblique text if it interests you.
font-size
Font size is important on a web page! You wouldn’t want a font where users have to get three inches away from their screen to read some text and you don’t want the text to be in-your-face huge. Depending on the font and the size of the glyph, text on a web page is usually anywhere from 11pm to 14px. Now… without confusing you or myself we’ll examine the possible values of this property.
- larger
- smaller
- xx-large
- x-large
- large
- medium
- small
- x-small
- xx-small
- percentage denoted by %
- pixel denoted by px
- em unites denoted by em
Ok, we’ll take this one step at a time… Consider the following:
p.xx-small {font-size:xx-small;} p.x-small {font-size:x-small;} p.small{font-size:small;} p.normal {font-size:medium;} h3 {font-size:large;} h2 {font-size:x-large;} h1 {font-size:xx-large;} p.custom-font {font-size: 2em;} p.pixel-font {font-size:18px;}
Ok, now let’s see some examples! xx-small text, x-small text, small text, medium text, large text, x-large text, xx-large text, 2em text, 18px text.
Excellent, now let us decode this all. I’m sure we can all agree on font sizes xx-small — xx-large, just be sure they’re used appropriately… We should really concentrate on the last two. The “em” and “px” units.
The Pixel
If you’ve ever created an html table that had “width=53″ then you have used the unit called the pixel before. What is a pixel? A pixel is the smallest element of information of an image. This holds true for a digital graphic file and the very screen you’re looking at right now. The smallest unit is called a pixel. So let’s try something here… How about text that is 1px text? (1 pixel text is what that says). See how small that is? If you want to learn more about the pixel, check out this Wiki article for more details… a lot more details.
The Em unit
Em units are proportional to the size of the current font. 1 em = the current font size. 2 em would be double the current font size. If we have a font that is originally 10pt then 1 em would equal 10pt font. If we wanted that font to be twice the size we would use 2em which would equal 20pt font and so on.
1 em font
10pt font
2 em font
20pt font
If this em unit interests you please check out this Wiki article to read more about the em unit.
Percent with fonts
Percentages have increasingly become more commonplace over the past few years. Sometimes percentages are used to define widths or heights but they can also be used to define the size of fonts. Here’s an example:
body {font-size:100%;} p.half {font-size:50%;}
So in the body, the font is 100% of the size and in the class “half” the font is 50% of the size. So we have..
100% size text and 50% size text. Not surprisingly, our 100% size text is well… 100%. Our 50% text, however, is quite small and probably not something we would use very often.
The rest of this tutorial will be published on wednesday! Stay posted!!
Web Hosting Types
Oct 24th
When starting a website it’s important to get the right kind of hosting for your particular site. If you choose the wrong kind, you could lose traffic due to downtime, server overload etc.
Let’s look at the different types:
Free Web Hosting
Free web hosting is great for the obvious reason that it’s free. If you are just starting out, free hosting can be a great no risk option. Free hosts will usually have a pretty small limit on space and bandwidth, so once your site starts becoming bigger or getting more popular you’ll definitely need to upgrade.
Shared Web Hosting
Shared hosting plans are the best option for most websites out there. Shared Hosting is usually packed with features and will only cost a few dollars a month. You’ll get much better support than on any free plan. If your site has small to medium amount of traffic, shared hosting is for you.
Reseller Hosting
Reseller hosting is great for web designers who want to host client’s websites for them. The cheapest reseller hosting accounts will usually cost in the $15-$30 per month price range. They allow you to create separate web hosting accounts and control panels for each customer and divide up your resources between these accounts.
Virtual Private Server (VPS) Hosting
This is when a hosting company divides up it’s server between a small amount of customers. Each customer’s account acts as a separate server, and each customer will have root access to his/her own server.
Dedicated Hosting
Dedicated hosting is for high traffic corporate/business sites. An entire server is dedicated to one customer, and the customer has full control over that server. You can get either managed or un-managed dedicated hosting. With managed hosting, the hosting company will take of the technical side of things like security and software updates, and thus will cost a lot more.
Basics of CSS – Part # 3
Oct 23rd
This is a continuation of Basics of CSS 2 (obviously) but it’s really just the continuation of common properties and their values that we are able to use! So without further to do…
Text Property
The text property can be easily confused with the font property. Do not get confused! The text property is for the actual characters you see. The text property treats all text as individual characters where as the font property is for font types, font size, font weight, etc.. So let us see these properties already!
Text Color
How do we change text color? In Basics of CSS – Part # 2 there was that fancy area where all the text was a different color (if you didn’t see then click here to see).
It was very simple actually. All that was used was some inline CSS and an HTML elements called span that is, by default, an empty element (it does nothing unless you tell it to in CSS).
<span style="color:red">red text</span> <span style="color:#3333FF">blue text</span> <span style="color:rgb(51,255,0)">green text</span>
This example would make the text like so: red text, blue text, green text. Cleverly, the colors red, blue, and green were chosen. Like the background property as seen in the Basics of CSS – Part # 2, we have the ability to use color names, hex color codes, and rgb decimal values.
As with all CSS properties, we can narrow where we want the color. Let us say we want one color for all h3 elements and another color for all h2 elements.
h2 {color:blue;} h3 {color:#470b0b;}
text-align
How do we align text in CSS? We know how you might do it in HTML but you like CSS better and having to add align=”center” is a pain… And what if we wanted the text a different color for each alignment?
The solution is very simple! Let us assume we want a dark green color for all text that is aligned to the right, a dark blue color for all text aligned in the center, and a dark red color for all text aligned to the left. Our CSS will be as such:
.right { text-align:right; color:#006600 } .center { text-align:center; color:#000066; } .left { text-align:left; color:#660000; }
These are global classes which means they can apply to any HTML element. Consider the following:
<h3 class="center">Dark blue Heading that is aligned center!</h3> <p class="right">Dark green text that is aligned right!</h3> <div class="left"> <ul> <li>list</li> <li>list</li> </ul> </div>
Using those “global” classes in CSS we are able to use them for any HTML element we want. So if you’re intending to use a class for more than one element, this is the approach that is the easiest.
text-decoration
Text decoration isn’t as artsy as it may sound. With the text-decoration property you have the ability to underline, overline, strikethrough, and a weird value called blink. Note: the blink value DOES NOT work in IE, Chrome, or Safari; if you have one of these browsers the blink example will look like regular text and will not blink. Using this property is still in the same fashion as using any other CSS property. Example:
.underline {text-decoration:underline;} p.strikethrough {text-decoration:line-through;}
How about some ketchup for your fries?
<p class="underline"> Underline text</p> <h3 class="strikethrough">This is a bad heading</h3>
text-transform
The text transform can save you a lot of headaches if you’re writing a formal document such as a Terms of Use, Terms of Service, Acceptable Use Policy, or Privacy Policy. Or even if you’re simply writing some site rules for your blog or anything else of the like, this property can save you time.
So let us say you’re writing your Terms of Service document for your web hosting company and you decide an entire section should be written in capital letters (Yes, I really used the property here). There are three values we can have for this property.
.uppercase {text-transform:uppercase} p.lowercase {text-transform:lowercase} h3.capitalize {text-transform:capitalize}
Let us test these out! Here are some examples: here is some uppercase writing, HERE IS SOME LOWERCASE WRITING, and here is some capitalized writing, how fancy! You might have a hard time believing that what was used is Inline CSS… look in the source code of this article and you’ll see how it was done! Here’s what was done:
<span style="text-transform:uppercase;">here is some uppercase writing</span> <span style="text-transform:lowercase;">HERE IS SOME LOWERCASE WRITING</span> <span style="text-transform:capitalize;">here is some capitalized writing, how fancy!</span>
And there you have it! Some more general CSS properties that we can use! You can download a review or everything that was done in this tutorial here in a zip file (1.90 KB, very small!). I elaborated on justify inside of the html document, so if you’re interested in justify then I recommend you download it.
Overselling Explained – so much for so little
Oct 22nd
In order to gain a little more money off of each server they own, some web hosts may oversell the available space or bandwidth. For example, if a hosting company has one server with 250 GB of space and they have 25 customers who each have 10 GB hosting plans, the host is not oversold, because there is enough room for the full 10 GB to be used by each customer. Now, what happens if this company gets a 26th customer. It seems as though they need to buy a new server in order to fit this customer.
But then the host has a brilliant (but not so honest) idea! They notice that even though each of their customers accounts guarantee 10 GBs of space, they are only on average using 2 GBs each. This means they could easily fit the new customer on this server, because the chances of all the customers filling up their 10 GBs completely is low.
How does this affect you?
Overselling often results in:
- Slow page loading times.
- Hosts complaining to you when you are using a lot of space (even though you are within your limits).
- Hosts suspending or disabling your account with no refund.
It’s a good idea to stay away from oversold hosting. If you see a host offering hosting packages that just look way too good to be true – it’s because they are too good to be true.
Basics of CSS – Part # 2
Oct 21st
Assuming you already have prior knowledge of CSS and/or your read the First Tutorial, then we will continue learning the basics of CSS!
Common properties
We’ll begin this with a few very common properties that will almost always be used in style sheets!
Background
| CSS background properties are used to define the background effects of an element. |
|
Background Color
Our first example is of the background-color property. This property will allow us to change the background color to anything we want. We can do this three different ways, see the example below:
body {background-color: blue;} Sets background to Blue body {background-color: #0000FF;} HTML Color Codes body {background-color:rbg(0,0,255);} RGB Values
The code above is setting the background color of the body element to BLUE and we can accomplish this three different ways!
- Using your regular colors such as Red, Orange, Yellow, Green, Blue, and Purple and many other colors. See this list for all of the 150 colors.
- Using HTML color codes such as… #45D7DD, #2BD023, and #E43EE2.
- And the last method is by using RGB Values such as rgb(000,206,209), rgb(255,215,000), and rgb(144,238,144). Click here for HTML Color Codes and RGB Values.
Background Image
Using this property we can insert an image as the background to a web page, create interactive menus, etc.. The background-image property is repeated by default and will cover the entire area unless specified otherwise. Consider the following code:
p.yellow-paper {background-image:url("images/notepaper_yellow.jpg");}
We can see that p is a selector but we add a class so if we wanted anything within any p element to have the notepaper_yellow.jpg background we could simply type:
<p class="yellow-paper">Some text here on yellow paper</p>
The image “notepaper_yellow.jpg” will be the background for the text we type, in the case CSS.
Background-repeat
The example with the notepaper_yellow.jpg has a problem that might not be so obvious. We didn’t define a height OR width for that image. This can be done two ways.
- We can make an image that will span the entire width of our site (let say 1000px;) and have it festering on our server OR
- We can create the image using Photoshop or any other image editing software and simply crop the image to the full height (in our case 18px) and 1 px in width and simply use the repeat-x property!
Each has their pros and cons I suppose; however, usually images are cut down like that in order to save bandwidth and page loading times. It also makes it easier for you to design your web page. For example: notepaper-yellow.jpg. at 1px X 18px is 2.75KB! That’s very insignificant when it comes to designing as web site and it is also something very easy to work with.
p.yellow-paper { background-image: url("images/notepaper-yellow.jpg"); background-repeat: repeat-x; height: 18px; /*defines the height of the image*/ line-height: 18px; /*defines the height of the "text box"*/ }
Note: Text box is used very loosely and is very vague. Think of the line-height property as an invisible box around each line of text. This property will add/contract space between these invisible boxes.
So the background-repeat property has four possible values:
background-repeat: repeat-x; /*repeats along the x-axis*/ background-repeat: no-repeat; /*forces the image to NOT repeat*/ background-repeat: repeat-y; /*repeats along the y-axis*/ background-repeat: repeat; /*repeats along both the x and y axis*/
So let’s apply all of this useful information! Let’s actually make something! I put together a small .zip file of an .html, .css, and two image files that are relevant to this tutorial and the first Basics of CSS Tutorial. The package is 8.37KB (very small) and I recommend you download it and read some of the comments and try to “decode” the HTML and CSS. You download it here.
Background Position
This property is a little more confusing in a way.. You can actually include x% and y% and xposition and yposition if you happen to know exactly where you want your image to reside on a web page. However, the creators of CSS gave us the most common places where an image might be on a web page.
background-position:top left; background-position:top right; background-position:top center; background-position:center left; background-position:center right; background-position:center center; background-position:top; background-position:bottom; background-position:center; background-position:left; background-position:right; background-position:bottom left; background-position:bottom right; background-position:bottom center; background-position:x% y%; background-position:xpos ypos;
As you can see there are a LOT of choices you can choose from. I actually prefer more advances positioning elements that we’ll explore in later CSS tutorials. For now, there are your options.
Background Attachment
This property can be quite irksome in some ways… Here are the possible values
background-attachment:scroll; background-attachment:fixed;
Now scroll means the image will scroll with the rest of the page, which is default so this property is basically useless unless you want the image to be fixed and have the web page scroll under the image. This is very uncommon and usually it’s pretty annoying unless you have a good reason for an image to remain fixed.
Background All-Inclusive
CSS makes it very easy to include all of our values with ONE property! The lovely background property. Isn’t not a bad thing to write out code like this:
body { background-color:#fff1d8; background-image:url("image/gradient.png"); background-repeat:repeat-x; background-position:top center; }
however… you can accomplish the same thing by doing this:
body {background:#fff1d8 url("image/gradient.png") repeat-x top center;}
Pros and Cons of Compact Model
There are, of course, Pros and Cons to each style.
| Pros of compact style | Cons of compact style |
|
|
Pros and Cons of Extended Model
| Pros of extended style | Cons of extended style |
|
|
So we can see how each has good and bad parts. I believe there is no “proper” to writing your properties. If you’re more comfortable using the extended model then use that! As long as it is easier for you, that’s all that really matters in the long run. Just make sure your CSS is syntactically correct and you organize your CSS for ease of readability.
The Myth of Unlimited Hosting
Oct 20th
While looking for a suitable web host, you probably stumbled upon a hosting company that claims they offer you unlimited space and bandwidth, for only a couple bucks a month. Seems like such a great deal at first! But think about it – If I told you I went down to the store and bought myself a new hard drive with unlimited space, would you believe me? That’s how silly this unlimited hosting is.
These companies like to write a lot more about what “unlimited” really means in their acceptable use policies (AUP). For example, look at this part from an AUP of an unlimited host:
“You understand and agree that shared server space is for business and personal website operations purposes only and not for unrelated data storage.”
I’ve had a bit of experience with these unlimited hosts. Even if I’m not violating the AUP, they like to send me emails asking how each and every file on my account is related to website operations. They actually wanted me to explain for each file and there were hundreds of them. If you start using a lot of space, they try to catch you doing something wrong, so they can reduce the amount of space you are taking up. They also like to complain that your website is using up too much CPU on the server and claim that you need to upgrade to one of their dedicated servers that cost $100/month or more.
Overall, it’s not a good idea to go with an Unlimited host. They hide behind the fine print and don’t offer honesty to their customers.



