Using Spacer Images
Print This Post
198 CommentsRelated Reading |
This section of your free online web design course covers “spacer” images, which are basically 1×1 dimension, transparent GIF images used to create useful blank spaces in a web page.
For example if you want two objects to be a certain amount apart from each other, you can part them by placing a spacer image with a width of the desired distance inbetween these two objects.
Below is an enlarged 1×1 transparent GIF image. I’ve set the “width” and “height” attributes of this image as 50 pixels for you to be able to see it and save it, but it is still originally a 1×1 dimension image. Save it to your hard drive by right clicking and selecting “Save Picture As…” from the menu:

Sidenote: Make sure you save it to the same folder as you keep your HTML files, or change the filepath accordingly in the below examples.
Let’s say we want to separate two pieces of text horizontally or vertically. In order to do that, we can use either tables or spacer images. Have a look at the below HTML code:
| <html> <head> </head> Online Web Design Course </body> |
In the above HTML code, “Online Web Design Course” is separated from “is your totally free HTML help!” by 100 pixels horizontally, as we have set the width of our spacer image as “100″. Below is the output of the above HTML code:
| Online Web Design Course |
Sidenote: Remember to set the height of your spacer image as well as the width when setting it up. When separating items horizontally, the height of your spacer image should be “1″. Similarly, if you are using the image to separate items vertically, set the width of the image to “1″.
Let’s do the same thing, but this time vertically:
| <html> <head> </head> Online Web Design Course </body> |
Notice that this time we have set the width of our spacer image to “1″ and the height to “100″ so that our texts will be 100 pixels apart *vertically*. We have also put two <br> tags to separate our items with a line break. If we did not put the <br> tags, our texts and image would appear in a horizontal row instead of a vertical row, so we need those <br> tags. Below is our output:
| Online Web Design Course is your totally free HTML tutorial! |
Note that you can position many types of items (i.e. images, flash animations, form elements, etc.) by using spacer images.
If you enjoyed this lesson, please link to it
This was the last section of Lesson 1-07. Next lesson is about putting links in your HTML documents. Let’s head on to Lesson 1-08!









office of generic drug…
Buy_generic drugs…
chronic bronchitis from marijuana…
Buy_now…
skin cancer foundation australia…
Buy_generic drugs…
atkins diet first week foods…
Buy_without prescription…
fungi amazing facts…
Buy_drugs without prescription…
decreased appetite during pregnancy…
Buy_generic drugs…
reversing alcohol induced neuropathy…
Buy_generic meds…
maximum daily dose for venlafaxine…
Buy_it now…
natural cures for premature ejaculation…
Buy_generic drugs…
can a woman have colorectal cancer…
Buy_drugs without prescription…
food low in cholesterol…
Buy_now it…
dog hives and what causes them…
Buy_drugs without prescription…
canadian paediatric diabetes association…
Buy_now…
discovery of zinc in human health…
Buy_now…
ayurvedic ashwagandha zyban…
Buy_generic pills…
when develop toxemia pregnancy…
Buy_it now…
emotions surviveing uterine cancer…
Buy_generic meds…
period changes leading up to menopause…
Buy_it now…
drug additiction symptoms…
Buy_generic meds…
clinical studies of clonidine…
Buy_no prescription…
school age adhd self absorbed…
Buy_now it…
diet generator reviews…
Buy_it now…
relief of skin itching…
Buy_now it…
clinical diagnosis and medical records…
Buy_generic meds…
psychiatric care model…
Buy_generic meds…
eye drops canine paralysis…
Buy_now…
new birth control pill…
Buy_now it…
most successful diet ever…
Buy_generic pills…
meal plan for hypertension…
Buy_generic drugs…
sleep apnea side effect of lexapro…
Buy_generic pills…
zocor orange juice effects…
Buy_no prescription…
scabies in dogs help…
Buy_generic drugs…
tsa drug dogs for adoptino…
Buy_generic drugs…
regulations for dementia units…
Buy_drugs without prescription…
cause for morning erections…
Buy_generic meds…
barbecue interactions with drugs…
Buy_generic meds…
inpatient drug rehab sanford fl…
Buy_it now…
acyclovir stada cream…
Buy_generic drugs…
green@mountain.coffee.cafe.club” rel=”nofollow”>……
Buygeneric meds…
augmentin@duo.buy” rel=”nofollow”>……
Buygeneric pills…
avodart@and.rogane” rel=”nofollow”>.…
Buydrugs without prescription…
propecia@before.and.after.picture” rel=”nofollow”>.…
Buywithout prescription…
can@hair.grow.back.after.hair.loss.from.protonix” rel=”nofollow”>.…
Buynow it…
pietro@atrovent.buy” rel=”nofollow”>……
Buygeneric meds…
can@you.give.risperdal.and.abililfy.together” rel=”nofollow”>..…
Buygeneric meds…
rogaine@foam.canada” rel=”nofollow”>.…
Buyno prescription…
best@medicare.plan.d.for.nexium.40.mg” rel=”nofollow”>..…
Buygeneric meds…
infant@prevacid.dose” rel=”nofollow”>.…
Buygeneric drugs…