How to Get Rid of Bed Bugs – Getting Rid of Bed Bugs

 

There are many ways to get rid of bed bugs but if you do not know how then you could end up with a very big problem on your hands. These pests have an ability to bite humans with their sharp pincers, which can be deadly, and can also be very painful. It is important that you know how to get rid of bed bugs in your home before they get too far.

The first way to get rid of bed bugs is to use a steam cleaner. You should purchase one of these things at your local hardware store and make sure you follow the instructions properly. They do not come cheap and there will be a hefty price tag attached to this unit. If you want to save a few dollars and have it professionally cleaned then go for it but you should know that you will need to follow the manufacturer’s instructions on how to use it correctly.

Other people may also be aware of using pest control companies. You can call them up and ask if they will be able to use their services to get rid of bed bugs. You can ask if there are any risks to using them so that you can protect yourself. A pest company will spray their equipment on the area where there are bed bugs and they will kill the bugs off with the steam. This is done in your home or office and you will then need to vacuum up the area.

You should also know that getting rid of these bugs from within your home is actually easier than getting rid of them out of your home. There are many products that you can purchase to help you get rid of bed bugs from your home.

If you are going to use these products then you should know that you will need to follow the instructions that are provided to you. There are products out there that claim to be effective but they do not work. You can also find products that may contain harmful chemicals and this is something that you should avoid.

If you have children in the home then you will have to make sure that you know how to get rid of bed bugs in your home because they are a natural predator for the bug. If you have pets then you will have to be careful because they will eat them as well. You can purchase products that will help to control the bugs that are already in your home so that you do not have to deal with this problem.

The last thing that you should know how to get rid of these bugs in your home is by using a product called liquid soap. This is used on the beds and the cracks and crevices that they crawl into. This way the bugs will have no place to hide. Once they are out of the way you will be able to enjoy a fresh-smelling house instead of having to deal with it.

You should know how to get rid of bed bugs in your home. These little pests do not discriminate and if you treat them the right way you should be able to keep them away.

You can get rid of them by using a professional who will do a thorough inspection of your house and they will be able to tell you what you need to do to get rid of the bugs that are in your home. This way you do not have to deal with these bugs every day.

You may even have to get rid of the bugs one room at a time and this is a good idea. You may want to hire a professional to come to your home and to look around the entire house and determine exactly where the bugs are and then you will know how to get rid of them for good.

You can hire a professional service to get rid of these bugs. This way you can get the results that you want and you can feel confident about the way that you are cleaning the place.

How to Remove Black Mold From Your Home

 

Stachybotrys chart, also called toxic or black mould, is a type of fungus that creates its conidium in spores called conidial slimes. It’s common to find it in grain and soil, but in damp or wet areas of buildings most commonly found in damp, humid conditions, such as basements, bathrooms, laundry rooms, and laundry rooms in houses and other structures.

It’s a type of mould, but unlike some, it has toxic mold. Toxic mold is known to cause severe respiratory problems, as well as many types of cancers. The spores are not harmless to humans and can be very harmful if inhaled. Even though you might not be able to see them with the naked eye, you can be sure that they’re there.

Toxic mold grows best in moist, dark areas, such as bathrooms and laundry rooms. If you find black mould growing in your laundry room, it could indicate an infestation in your bathroom, too. That’s because many people will wear undergarments with fabric that has a lot of thread count and polyester fibers, like cotton, and you wouldn’t want a black mold growing in your clothing, would you?

Since toxic black mould can cause such problems, the sooner you can remove it from your environment, the better. Even if it seems like black mould is just a symptom of a bigger problem, removing it now will help keep your health and those around you healthy in the long run.

When it’s time to remove black mould from your environment, you don’t have to get rid of everything. You can get rid of what you think may be the problem but don’t eliminate the things that could be contributing to the problem, like clothes and towels and so on.

In most cases, just getting rid of the black mould on your items is usually enough to solve the problem. However, you should take a look around your place of business and inspect the rest of the places where there could be black mould growing.

Black mold is usually found on mattresses made of cotton and wool. If you see black mould growing in your bedding, you may want to vacuum the mattress and make sure that all pillows are free from any black material or fungi. Another possibility is to clean the pillow cases and remove any possible spores, then disinfect them before replacing them.

Other common signs that black mould may be growing in your area include water spots on sheets, upholstery and rugs and carpets, paper in the bathroom, walls, and even on the sink or in showers and toilets. If you’re experiencing these symptoms, you can also get rid of these as well. Wash the surfaces thoroughly with bleach. You can even put a sheet over your affected area to kill off the fungus, which will help to prevent it from spreading further.

Black mold thrives on moisture, so drying your house out and turning everything inside out can help to keep it from growing. You can also use products like Lysol to kill off any spores that might still be living in the air ducts or pipes.

Cleaning black mould from your home is a bit more complicated than just vacuuming and cleaning with bleach. You’ll need to use a disinfectant on the affected surfaces to kill off any remaining black substance and remove any spores that might still be hiding in places where they’re not obvious.

The most effective cleaning solution is the use of bleach to disinfect the surfaces, but you may want to use a combination of bleach and a cleaning product that include an ozone generator to kill off any spores that may be left over after cleaning. After the cleaning solution is added to the areas that may be infected, use a cloth dipped in the cleaning agent to wipe down the infected areas.

It’s important to note that it’s important to wash your clothes properly after cleaning black mould to prevent them from becoming contaminated with the spores that can still be on them. Once all of the black material has been cleaned, dry them well and store them in sealed plastic bags for safekeeping.

What Is The Best Pest Control Service Near Me?

 

The best pest control service near me is one that has been around for several years. Here are some things to look for when choosing a company for your needs.

It should have a great reputation in the community and should have plenty of references. You want to know that the company is capable of providing quality service and will not take advantage of your needs.

If you have pets, check to see if they have been treated with a pesticide before you hire a pest control service near me. Many people hire a pest control service to take care of their animals but many of them don’t realize that the chemicals are toxic to them. They have an open invitation to use these chemicals on their pets.

If the company you are looking to have an operating license from your state, it should be listed on their website and in their business bureau. This will give you some peace of mind, as well as make your job easier.

Another thing that will help you find a reputable pest control service near me is to ask them for references. This is very important if you have children or animals. You want to know that they have the experience to deal with all of these issues properly. A good pest control service will provide you with an unbiased review of their services.

If you find a pest control service near me that can provide you with quality services, it will save you a lot of time and hassle. You will have a pest problem under control and no one else will have to deal with it.

Finding a pest control service near me can take some time. Are patient and research all of the companies to make sure you are hiring a good pest control company.

Make sure you compare all of the different services and see what kind of treatment they offer. You want to choose a company that is reputable and reliable.

Find out if they offer a free evaluation. This will allow you to see how their technicians do on a day-to-day basis. This will give you a feel for whether or not they are going to be able to take care of the issue you are having with pests.

Make sure that the company has a good reputation and is licensed to operate in your area. Look online to see what other people have to say about them.

Be careful about choosing one with poor reviews. You don’t want to do business with a company that is known for shoddy work.

When you find a pest control service near me, give them all of the information you can about your issue. This is the best way to get a full picture of what they offer and to make sure that the problem is dealt with properly. They need to be aware of everything so they can offer the best assistance possible.

Once you’ve chosen a company, make sure you are clear about all of your expectations. Make sure you know what to expect.

If you are having any concerns about the service, let the company know so they can give you all the details. Once you have found a pest control service near me, your home will be back to be pest free.

When you want to hire a pest control service near me, remember that you don’t want to compromise quality for price. That’s why it’s important to ask questions and compare all services.

If you choose a pest control service near me, it should give you peace of mind knowing that you have the best service possible. It should also provide you with the tools and resources you need to keep your home and family safe.

If you’re in need of a pest control service near me, consider the above factors to help you in your search. You’ll find a great company when you do your research.

What Are Some Adult Toys For Children?

 

Have you ever been in a situation where you couldn’t bring yourself to get out of the house and play with your favourite adult toys? You wanted to play and enjoy, but you just couldn’t stop yourself. You wanted to go and see a movie with your friends, but you had the urge to stay at home with your favourite adult toys.

The good news is that adult toys have grown significantly in recent years. There are a ton of choices for you and your kids if you’re going to be purchasing toys for your kids.

There are new games to play, new educational materials to use, and more options to choose from than ever before. If you want to get a jump start on the fun, there are many toys available that will help you get started. Here are some of them.

The biggest problem is that it’s tough to get kids involved with this kind of toy. Kids don’t like to make new things, and they don’t really enjoy learning new skills. This kind of toy can be fun and educational, but it’s not really a good option for kids who want to try something different.

There are toys out there that can actually help your kid’s imagination. This way, you can stimulate their creativity and make them think more rationally.

Toys such as this can teach your kid about colors, shapes, and the world of animals. They’ll learn the difference between a dog and a cat, what an elephant’s trunk looks like, and more. You can even get a pet monkey to help your child learn about all of this stuff. There are so many exciting things to learn about when they have a toy like this around.

When you’re playing with a pet turtle, you’ll be able to communicate a lot more with him than you could with a dog or cat. They have emotions, just like humans do, and they know when you want to pet them or not.

There are plenty of toys out there for both boys and girls. There are all kinds of cute little ones to choose from, whether you want to play with your little princess or something more rugged like a jungle cat or a horse. They’re definitely a great way to entertain your child.

If you’re looking for something that your child might not want to give up entirely, there are still a few options available. You can get a few small bottles of milk or a little hand blender and make milkshakes for your child. These are great because they will keep your kid entertained long enough to get them interested in learning more about cooking.

There are also some toys out there that can allow your child’s imagination to run wild. This means you can teach them everything from construction to sports. math.

You can use all kinds of creative playthings to teach your child the alphabet and numbers. Even if your child is old enough to do it on their own, you can still find ways to teach them how to read. and count.

If you and your child are both interested in toys that your kids can use with other children, you can find tons of toys that will let them bond with other kids. This can be a great way to create a sense of family among the whole family.

The great thing about playing with toys like this is that you can do it any time of the day or night. It doesn’t have to be expensive to have a blast playing with them.

Furniture Stores – Get The Best Selection And Discount

 

Visit New Zealand for a shopping spree and make your purchase at Furniture Stores Auckland. Visit this online furniture store and pick up great bargains on all sorts of unique and contemporary furniture items for your homes and offices.

Meet Cheap and Discount Furniture Stores and Shops in New Zealand. Get a different style of furniture at a discount rate at cheap furniture stores in Auckland, New Zealand. These stores offer various kinds of furniture including contemporary furniture, modern furniture, traditional furniture, children’s furniture, etc, so whatever type of furniture you are looking for, these stores have a great variety.

Visit these furniture stores in New Zealand and pick up unique furniture pieces that will add a new touch to your house. These furniture stores offer different varieties of contemporary furniture, such as coffee tables, chests, bookcases, mirrors, furniture for bedroom, dining room, living rooms, etc. These stores offer different kinds of contemporary furniture. From antique and traditional furniture to modern furniture, you can find them at the local stores.

Furniture stores offer a variety of furniture in different style and price. You will find a different kind of furniture like living room furniture, bedroom furniture, dining room furniture, etc. If you are planning to decorate your home or office with a different kind of furniture, you should try to visit different stores. The more you shop, the more you would get discounts and discount prices. So, visiting the stores will give you a chance to get discounts on the different types of furniture items.

The other great thing about visiting these furniture stores is that you can buy your items online too. This would help you save lots of money. Online stores offer different kinds of discounted and cheap products to attract more people to buy it. The online stores also offer special discounts to their customers if they use their online checkout facility.

The other great thing about shopping online is that you would get to save lots of money. It is true that these online stores offer lower rates than brick and mortar stores but it is worth shopping on the internet because it gives you convenience and comfort. Shopping through the internet saves your time, effort and energy.

There are many other cheap furniture stores in New Zealand. Some of them have a wide variety of different kinds of contemporary and antique furniture as well. If you are looking for traditional furniture, then you can look for the country furniture in New Zealand. The furniture in New Zealand is made from the finest materials and has a touch of culture. You could also shop for unique items and collect some old items for your own collection.

Visit these cheap furniture stores and pick up great deals on all kinds of modern and unique furniture for your homes. It will make you feel satisfied and happy when you are at home or in the office because you would get a comfortable feeling and feel relaxed and contented when you buy furniture at discount and cheap price.

The best part about getting good furniture at discount and cheap price is that you can have it delivered to your home or office. It is easy to do as there are many online furniture shops where you could choose the type of furniture that you want and where you could get it delivered right at your doorstep. With this, you can have your new furniture at your doorstep within no time. so, if you are in Australia and want to have nice furniture for your home, now is the time to order them and get them delivered to you.

There are also discount furniture stores that sell used and new furniture and they provide you with an opportunity to get some of the best quality furniture at the lowest rate. on earth.

When you are in Australia, you will have lots of options to buy furniture for your home, whether it is antique furniture or contemporary furniture. Australian furniture is always in demand. The best thing about the furniture industry is that you can purchase the best quality of furniture from different places across the globe at low rates.

The stores provide you with a lot of space to shop and compare the different types of furniture and you would get better and more value for your money if you shop them from different stores. These stores also provide you with the advantage of knowing the different brands of furniture that are available and the price range and discounts available on different types of furniture.

Finding SEO Services in Brisbane

 

There are many SEO services in Brisbane and their services are as varied as the cities themselves. Some of the areas that provide SEO services are:

Many service providers of SEO services have their head office in other areas like Sydney or Melbourne, but Brisbane is the home of a number of companies providing SEO services. The competition between these companies is stiff, so you need to be sure that you find the company that will work best for your business. However, the most important thing is to find the right company for your business.

Every website has a website address that is associated with the address of the owners of the search engines that crawl the Internet and index the information. This link, called a link, is based on a particular search engine that a site is affiliated with. This link is referred to as a search engine result, and when someone enters this search into a search engine, it results in a page that lists all websites that are associated with that search.

If you are a local business that does not have the time to build and maintain your own website, there are many services that can help you out with the process. SEO services are the backbone of Internet marketing, and they can make your website rank higher in the search engines. The most successful sites have the best SEO tools and techniques in place.

One SEO company in Brisbane that offers their services is World SEO. World SEO specializes in building websites and maintaining them. This includes writing and marketing, website design, and a variety of other areas. It is their service that allows them to get more traffic, which can then translate into increased sales and profits.

The online world has changed quite a bit over the years since search engine optimization was introduced, so there are some differences between webmasters and SEO services today. It is best to consult a professional if you are going to be adding a lot of content to your website. You do not want to miss a moment to add content, as this could be the difference between getting the link back up and not having it at all.

Some SEO services require the person doing the search engine optimization to add the information and then remove it as needed. This can cause a delay as it takes time to edit and maintain your website. When you hire an SEO company, they will know exactly what they are doing and they can get the job done quickly. They will also know how to keep your content fresh and relevant as the need arises.

You will have to pay a company to provide SEO services in Brisbane, but there are some very affordable services that you can choose from. You do not have to go through a search engine optimization firm to get the results you are looking for. There are many other solutions available for a company that needs to optimize their site.

When you are trying to decide which company to use, take the time to do a price comparison. You should also check with the company to see if you are paying for a part-time employee or if the cost of the SEO services is already covered by your current payroll. You do not want to waste your money on SEO services that you may not need later on.

Another reason you may choose to use an SEO company that is not located in Brisbane is that you do not want to spend your money on shipping and handling costs. Search engine optimization is a professional service and the fees should reflect that. This means that if you need the services sooner than you plan, you can move forward without having to worry about a huge bill coming from a company.

There are many different providers of SEO services in Brisbane. You should make sure that you get your SEO work done from the best company you can find. You will also want to make sure that the firm you choose has a track record of quality service.

If you need search engine optimization, Brisbane is the place to go. Make sure that you choose a company that will take care of your business. and give you results that you can be proud of.

CSS Gradients are about to Graduate!

Finally all browser vendors are on the same page when it comes to gradients

The Webkit team introduced CSS gradients on April 14th, 2008. Shortly afterwards they presented it to the W3C for consideration as a recommendation. Sometime later, Mozilla decided to implement CSS gradients using the same notation the Webkit gradients, but with the -moz prefix. After some time, however, they decided to replace that notation with a simpler one. Ever since, to do CSS gradients on the Web you had to write gradients the Webkit way for Safari and Chrome, and the Mozilla way for Firefox. Well, now all browser vendors have agreed to implement the same spec. At this time you can write a single notation that is identical for Safari, Chrome, Firefox, Opera and IE10.

Since version 5.1, Safari has supported the newer notation. Opera beta running Presto 2.10.299 fully supports the linear and radial notation, although the developer site only mentions support for the linear notation. Firefox, of course, already supports this notation. And the latest beta of IE10 does as well. This means that at some point all browsers will support this notation. Well, sort of.

Recently somebody at the W3C has been thinking a little too much. As of January 2012 the document CSS Image Values and Replaced Content Module Level 3 now has a slightly different notation. Since this just showed up, there is no support for it in any browser. And, since it is a working draft, it could change at any time. So, at this time, I’m going to ignore what the document says and just cover what the latest browsers have agreed to support.

Because CSS gradients are still a draft proposal, all browser vendors use their respective prefixes with the notation. This is a good thing since the spec is in flux. They shouldn’t change their present implementation until the spec reaches recommendation status, in which case they can implement the final version of CSS gradients without their vendor prefixes.

Webkit: -webkit-
Mozilla: -moz-
Opera: -o-
Microsoft: -ms-

CSS gradients are rendered as a background image. That means that all of the properties of the CSS background module apply to CSS gradients. In other words, you can have multiple gradients on the same element and control their size and position as well, or use them as image masks. Also, whereas in the past you might have used a background color in conjunction with a background image, you can now use a background gradients as the backdrop for a background image, or you could have a transparent gradient layered over a background image. The ability to stack up gradients while controlling their size, position and repetition means you can create complex repeating patterns that would normally require a background image. The ability to define multiple background images results in a layered affect not unlike Adobe Photoshop’s layers. The new CSS filters module will increase the comparison with Photoshop further my providing many color filters, such as reverse, multiply, dodge, burn, darken, lighten, grayscale, etc. With JavaScript you could also manipulate the properties of your CSS gradients to produce a background pattern that morphs in real time.

Linear Gradients

The notation for linear gradients is quite simple and straightforward. First thing, you’ll be defining it as a background image on an element. CSS uses functions that create the gradient according to the arguments you provide. For linear gradients, the values you’ll need are as follows:

1

[<point (one value, two values or degrees)>]?, <color [stop]?>, <color [stop]?>

From the above definition we can see that all values are optional, except the start and end colors.

The first value (point) is optional. If no value is provided, it will default to drawing the gradient from top to bottom. You can use keywords for the position. These can be a single keyword or a combination of two. You can also use any valid degree values. The purpose of these point definitions is to define which direction the gradient flow towards. You also need to provide at least two colors. The first color will be where the gradient starts from, and the last color will be where the point indicates. So a gradient with yellow and blue and a point value of top will start at the bottom with yellow and end at the top with blue. Here re possible point values:

– top
– right
– bottom
– left
– top left
– top right
– bottom left
– bottom right
– 0deg
– 11deg
– 67deg
– 182deg
– -45deg
– -90deg

Colors can have optional stop values. If no stops are provided, the colors will blend equally from the first to the last.You can provide as many colors as you want to create the gradient, and you can vary their widths by providing stops. The value of the stops can use any valid CSS length identifier (px, pt, em, %, etc.). The position value is placed after the color. You can use any valid CSS colors, such as keywords (red, yellow, blue), or hex, hsl, rgb or rgba values. Regardless of what the stop position is for the last color, that color will continue filling the element the rest of the way.

1
2
3

background-image: linear-gradient(top, yellow 10px, red 80px);
background-image: linear-gradient(top right, orange, green 30%, yellow 70%);
background-image: linear-gradient(60deg, red, white, blue 50%);
Repeating Linear Gradients

Repeat linear gradients are easy to do. Actually, the same effect can be achieved with background size and background repeat properties, but it is nice to have it I suppose. It works the same way as regular linear gradients, except that you use repeating-linear-gradient as the function:

1
2
3

background-image: repeating-linear-gradient(top, yellow 10px, red 80px);
background-image: repeating-linear-gradient(top right, orange, green 30%, yellow 70%);
background-image: repeating-linear-gradient(60deg, red, white, blue 50%);
Radial Gradients

The notation for radial gradients is similar to linear gradients, except that you can specific a shape argument to control how the radial is produced. Here’s the possible values:

1

[<position (two separate values)>]?[[<shape (literal value or length value)>] || [<size length value>]>]? <color [stop]?> <color [stop]?>

From the above definition we can see that all values are optional, except the start and end colors, just like linear gradients.

If no value for position is supplied, the radial gradient will be centered in the element. Position is based on the center of the radial gradient. It accepts the same values as background position. Those values include percentages, lengths and keywords. Just like background positioning, you can use negative values to move the center of the radial gradient off the screen. Percentages and lengths require two values, the first defining the x axis and the second defining the y axis.

1
2

percentage: 0% 0%, 20% 60%, 50% 50%
length: 0px 0px, 24px 45px, 3em 5em

The keywords are: top, right, bottom, left and center. You could combine these in various ways:

1

top left, bottom right, center center, center right, top center

Shape can be either circle or ellipse. If no shape is supplied, if the length value is single, it defaults to a circle with a radius defined by that length. Otherwise, if no shape is supplied and two lengths are passed, it uses those to draw an ellipse. The first value determines the width, the second the height:

1
2
3
4

// A vertical ellipse:
background-image: radial-gradient(center, 100px 400px, red, white);
// An horizontal ellipse:
background-image: radial-gradient(center, 400px 100px, red, white);

If you use one of the shape keywords, you can also use size keywords to control how the radial gradient is draw in relation to its container. The size keywords are:

– closest-side
– farthest-side
– closest-corner
– farthest-corner

First of all, these keywords only work when you use a shape keyword. Defining the shape of the radial gradient with lengths and then trying to use these size keywords will not work. So, this is how these size keywords work. If the container is narrower than it is tall, the size of circle or ellipse will be restrained by the left and right of the container. With farthest-side, it would be restrained by the top and bottom of the container, probably resulting in the left and right extending beyond those sides. Be aware that these work in relation to the position of the radial gradient. That means that if it is positioned near the top left, it will be rendered differently than if it were centered. Closest-corner and farthest-corner work just like closes-side and farthest-side. The best way to get the hang of these keywords is to play around with a radial gradient to see how they affect it. Although these keywords are nice conveniences, you’ll see that they are far from exact. If you need precise placement and size, you’re better off using lengths to define the size of your radial gradient.

Color and stops work similar to linear gradients. The first color defined the color drawn from the center of the radial gradient. The last color will define the outermost color of the gradient. Stops allow you to define more precise positioning of those colors in the radial gradient.

Repeating Radial Gradients

Like repeating linear gradients, it is possible to create the same effect as a repeating radial gradient. You’d just need to define it tediously repeating the colors and providing appropriate stops. In contrast, using the repeating-radial-gradient function makes this easy.

Practical Examples

Enough with theory. Let’s look at what we can do with linear and radial gradients. By layering them and controlling their size and positioning, we can create complex patterns that we can use as Web assets. Please note that in all of the following examples I’m presenting the gradients without vendor prefixes. To have them render in a browser that currently supports CSS gradients, you would need to provide the appropriate vendor prefix for that browser. When the current spec reaches recommendation status, browser vendors will drop their prefix.

In most of these examples I’ve used a transparent gray. This was so I could just add an background color to show through the transparency. Having the color controlled by the background color makes it easy to change the feel of the pattern.

Here’s a vertical stripe with the transparent gray stripe is separated by a 1 pixel transparent stripe:

1
2
3
4
5

background-image:
linear-gradient(0deg,
rgba(0,0,0,0.1) 75%,
transparent 75%);
background-size: 5px 100%;

 

Here’s the same stripe horizontal:

1
2
3
4
5

background-image:
linear-gradient(90deg,
rgba(0,0,0,0.1) 75%,
transparent 75%);
background-size: 100% 5px;

 

And here it is slanted to the left:

1
2
3
4
5
6
7
8
9

background-image:
linear-gradient(45deg,
transparent 15%,
rgba(0,0,0,0.1) 15%,
rgba(0,0,0,0.1) 50%,
transparent 50%,
transparent 65%,
rgba(0,0,0,0.1) 69%);
background-size: 6px 6px;

 

And then to the right:

1
2
3
4
5
6
7
8
9

background-image:
linear-gradient(-45deg,
transparent 15%,
rgba(0,0,0,0.1) 15%,
rgba(0,0,0,0.1) 50%,
transparent 50%,
transparent 65%,
rgba(0,0,0,0.1) 65%);
background-size: 6px 6px;

 

Now lets have some fun with repeating linear gradients. Here’s vertical repeating stripes:

1
2
3
4
5
6

background-image:
repeating-linear-gradient(0deg,
rgba(0,0,0,0.1) 0px,
rgba(0,0,0,0.1) 5px,
transparent 5px,
transparent 10px);

 

Horizontal repeating stripes:

1
2
3
4
5
6

background-image:
repeating-linear-gradient(90deg,
rgba(0,0,0,0.1) 0px,
rgba(0,0,0,0.1) 5px,
transparent 5px,
transparent 10px);

 

Left slanted repeating stripes:

1
2
3
4
5
6

background-image:
repeating-linear-gradient(45deg,
rgba(0,0,0,0.1) 0px,
rgba(0,0,0,0.1) 5px,
transparent 5px,
transparent 10px);

 

Right slanted repeating stripes:

1
2
3
4
5
6

background-image:
repeating-linear-gradient(-45deg,
transparent,
transparent 5px,
rgba(0, 0, 0, 0.1) 5px,
rgba(0, 0, 0, 0.1) 10px);

 

Now lets cross them:

1
2
3
4
5
6
7
8
9
10
11

background-image:
repeating-linear-gradient(0deg,
transparent 0,
transparent 5px,
rgba(0, 0, 0, .1) 5px,
rgba(0, 0, 0, .1) 10px),
repeating-linear-gradient(90deg,
transparent 0,
transparent 5px,
rgba(0, 0, 0, .1) 5px,
rgba(0, 0, 0, .1) 10px);

 

And now criss-cross them:

1
2
3
4
5
6
7
8
9
10
11

background-image:
repeating-linear-gradient(-45deg,
transparent,
transparent 5px,
rgba(0, 0, 0, 0.1) 5px,
rgba(0, 0, 0, 0.1) 10px),
repeating-linear-gradient(45deg,
transparent,
transparent 5px,
rgba(0, 0, 0, 0.1) 5px,
rgba(0, 0, 0, 0.1) 10px);

 

Enough with stripes, let’s get square:

1
2
3
4
5
6
7
8

background-image:
linear-gradient(180deg,
rgba(0,0,0,0.05) 75%,
transparent 75%),
linear-gradient(90deg,
rgba(0,0,0,0.05) 75%,
transparent 75%);
background-size: 5px 100%, 100% 5px;

 

And a nice checkerboard pattern:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
linear-gradient(45deg,
rgba(0,0,0,0.1) 4.5px,
transparent 5px,
transparent 16px,
rgba(0,0,0,0.1) 16px,
rgba(0,0,0,0.1)),
linear-gradient(45deg,
rgba(0,0,0,0.1) 4.5px,
transparent 5px,
transparent 16px,
rgba(0,0,0,0.1) 16px,
rgba(0,0,0,0.1));
background-position: 0 0, 8px 8px;

 

And let’s make those diagonal:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
linear-gradient(45deg,
rgba(0,0,0,0.1) 25%,
transparent 25%),
linear-gradient(-45deg,
rgba(0,0,0,0.1) 25%,
transparent 25%),
linear-gradient(45deg,
transparent 75%,
rgba(0,0,0,0.1) 75%),
linear-gradient(-45deg,
transparent 75%,
rgba(0,0,0,0.1) 75%);
background-size: 10px 10px;

 

Now that we have them diagonal, lets spice them up and turn them into an argyle pattern:

1
2
3
4
5
6
7
8
9
10
11
12

background-image:
linear-gradient(right top,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 50%,
transparent 50%,
transparent),
linear-gradient(left top,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 50%,
transparent 50%,
transparent);
background-size: 12px 12px;

 

OK, now lets take another look at stripes. But this time we want to shake things up about. We want to get out to the monotony of strictly repeating patterns, but still have a pattern. What I’m talking about is sometimes called the Cicada principle. It produces a pattern that doesn’t repeat itself exactly. It does this my layering different repeating patterns, except that these are different proportions, similar to the progression of prime numbers. Using this principle, I’ve created a series of overlapping lines that creates a textile like pattern that retains it’s randomness. Here’s the CSS:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

background-image:
linear-gradient(left,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 25%,
transparent 25%,
transparent),
linear-gradient(left,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 15%,
transparent 15%,
transparent),
linear-gradient(left,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 15%,
transparent 15%,
transparent),
linear-gradient(top,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 17%,
transparent 17%,
transparent),
linear-gradient(top,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 15%,
transparent 15%,
transparent),
linear-gradient(top,
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 13%,
transparent 13%,
transparent);
background-size: 10px 100%, 17px 100%, 21px 100%, 100% 10px, 100% 17px, 100% 21px;
backgroud-position: 0 0, 6px 0, 14px 0, 0 0, 0 6px, 0 16px;

 

Now lets play with radial gradients. We’ll start with basic patterns and build up to more complex combinations.

1
2
3
4
5
6
7

background-image:
radial-gradient(
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 45%,
rgba(0,0,0,0) 50%,
rgba(0,0,0,0) 95%);
background-size: 8px 8px;

 

Now we’ll take the above pattern and turn the dots inside out so that the pattern looks like someone cut holes in the color.

1
2
3
4
5
6
7

background-image:
radial-gradient(
rgba(0,0,0,0),
rgba(0,0,0,0) 50%,
rgba(0,0,0,0.1) 55%,
rgba(0,0,0,0.1) 95%);
background-size: 10px 10px;

 

Now we’ll just play with the size of circles a bit.

1
2
3
4
5
6
7

background-image:
radial-gradient(
rgba(0,0,0,0.1),
rgba(0,0,0,0.1) 9px,
rgba(0,0,0,0) 9px,
rgba(0,0,0,0) 17px);
background-size: 18px 18px;

 

OK, I now the above patterns are not revolutionary or anthing. Now we’re going to get creative. For the next ones we’re going to user colors, yeah! The next pattern has a gold background with orange and greenish polka dots:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
radial-gradient(
rgba(255,0,0,0.2),
rgba(255,0,0,0.2) 4px,
rgba(255,255,255,.10) 5px,
rgba(255,255,255,.10) 7px),
radial-gradient(
rgba(0,0,0,0.2),
rgba(0,0,0,0.2) 4px,
rgba(255,255,255,.25) 5px,
rgba(255,255,255,.25) 7px);
background-size: 18px 18px;
background-color: #ffd239;
background-position: 10px 10px, 0% 0%;

 

The next one I call puff balls because of their look:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
radial-gradient(
rgba(255,255,255,0) 90%,
rgba(255,255,255,.5) 90%,
rgba(255,255,255,.5)
),
radial-gradient(
rgba(255,255,255,0.01),
rgba(255,255,255,0.01) 10%,
rgba(255,255,255,255.1) 70%,
rgba(0,0,0,0) 79%,
rgba(0,0,0,0) 96%);
background-size: 20px 20px;
background-color: #ff77a1;

 

Here’s another gold pattern with four-pointed stars:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
radial-gradient(
rgba(255,0,0,0.2),
rgba(255,0,0,0.2) 8.5px,
rgba(255,255,255,.5) 9.5px,
rgba(255,255,255,.5) 17.5px),
radial-gradient(
rgba(0,0,0,0.2),
rgba(0,0,0,0.2) 8.5px,
rgba(255,255,255,.15) 9.5px,
rgba(255,255,255,.15) 17.5px);
background-size: 18px 18px;
background-color: gold;
background-position: 9px 9px, 0% 0%;

 

And here we change the background to green:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

background-image:
radial-gradient(
rgba(255,210,57,0.42),
rgba(255,210,57,0.42) 9px,
rgba(0,0,0,0) 11px,
rgba(0,0,0,0) 15px),
radial-gradient(
rgba(0,0,0,0),
rgba(0,0,0,0) 9px,
rgba(255,210,57,1) 10px,
rgba(255,210,57,1) 15px);
background-size: 17px 17px;
background-color: #1e8e04;
background-position: 8.5px 8.5px, 0% 0%;

 

And finally, we do some interesting overlap with the radial gradients:

1
2
3
4
5
6
7
8
9
10
11
12
13

background-image:
radial-gradient(
rgba(255,255,255,0),
rgba(255,255,255,0.5) 14px,
rgba(255,255,255,0) 14px,
rgba(255,255,255,0) 26px),
radial-gradient(
rgba(0,0,255,0.31),
rgba(0,0,255,0.31) 14px,
rgba(255,255,255,0) 16px);
background-size: 28px 28px, 28px 28px;
background-position: 14px 18px, 0% 18px, 0% 0%;
background-color: rgba(200,250,190,0.5);

 

You can see these gradients in action here. You can same the page to your desktop, since it is a self-contained document.

Proposed Changes to Spec

So, as I mentioned, since January 2012 the draft for CSS gradients at the W3C has some notation changes. Really their minor, but in my opinion, not necessary. Actually, I’m irritated by them. The two owners of the document: Elika J. Etemad and Tab Atkins Jr., from Mozilla and Google respectively, have decided to make the notation more English-like by requiring prepositions for the position keywords for linear and radial gradients. So if you had a yellow to red linear gradient that ended in the bottom right, you’d need to write the following:

1

linear-gradient(to bottom right, yellow, red);

For a radial gradient, it would be

1

radial-gradient(circle at closest-side, yellow, red);

OK, so if the point is to make it more English-like, shouldn’t it be:

1

linear-gradient(to the bottom right, yellow, red)

Or better yet:

 

Or:

1

radial-gradient(a circle positioned at closest-side, yellow, red);

And, last time I check, a big chuck of the world doesn’t know what the English word “to” means and so it adds no clarity to what the keywords are doing. I’m totally against requiring unnecessary English grammatical constructs in to CSS. We don’t do that with HTML or JavaScript. What strikes me as really odd, one of the authors is from Mozilla. They were the guys that complained that the original Webkit notation used “to” and “from” to designate the start and end colors. Now they want to make the simpler notation more complicated. Adding prepositions to keywords for gradients will not add any new functionality nor prevent any rendering errors. They just make the notation more wordy. Fail! Making CSS more English-like is a rabbit hole down which you do not want to go.

March 23, 2012

Since writing this post there has been some ongoing discussion at CSS Working Group about the reasoning behind the use of prefixes in the new syntax. The gist of it is that prepositions actually remove the ambiguity of direction when dealing with gradients. Here’s a quote from the discussions:

The “to” keyword was added to linear gradients because there was
significant confusion about whether “top” meant “start from the top
(put the 0% color on the top)” or “point toward the top (put the 100%
color on the top)”.

Radial gradients gained keywords in an attempt to make the syntax more
flexible and more readable – previously, for example, you could have a
declaration like “radial-gradient(20% 20%, 30% 30%, black, white)”.
It’s very unclear what that means – even if you know that one of them
is a position and the other is a size, how can you tell which is
which? Due to this ambiguity, the syntax also disallowed specifying
just a size without a position.

The new syntax, while not ideal in some ways, solves this problem –
you’d write the previous example as “radial-gradient(30% 30% at 20%
20%, black, white)” which gives you some clues as to which is the size
and which is the position. As well, it’s now possible to specify
either a size or a position alone, and have it parsed unambiguously –
“radial-gradient(30% 30%, black, white)” has an explicit size and
default position, while “radial-gradient(at 20% 20%, black, white)”
has an explicit position and default size.

In light of the above I’ve been won over to support prepositions in the gradient syntax. It solves the problems described above and will make creating gradients easier for everyone.

Practical Examples of the Flexible Box Model

If there’s one thing in CSS3 that really gives me warm fuzzies, it’s the flexible box model. What it does is provides a way to create many layout affects that otherwise would require workarounds with float or positioning or both. And there are many types of layouts that without out it would require JavaScript to create the same effect. Sadly, at present the flexible box model is only implemented in Firefox, Safari and Chrome. As it turns out, Microsoft’s IE team approached the W3C standards teams with a proposal for a grid-based layout module. It appears to be based on experience implementing the Silverlight grid layout system, which is a good thing. Silverlight grids are a powerful layout tool and is the most important feature for creating interfaces with Silverlight. Because this grid proposal is very solid, the W3C has dropped all further work on the flexible box model and instead are moving ahead in finalizing the draft for the grid layout module. If you read that speck, you’ll realize how much we need a CSS grid system. For now, however, we do have the flexible box model working in Firefox, Chrome and Safari, as well as on mobile Webkit, which includes iOS, Android, WebOS, and Blackberry. This means that if you’re doing mobile development you can use the flexible box model today to help you implement your layout needs. Once you start using the flexible box model, you’ll hate having to go back to situations where it’s not available.

The flexible box model got a lot of attention from a post by Alex Russell back in August 2009. The good thing is that in his post he showed some of the practical things that the flexible box model addresses and provided a stylesheet with a small subset of the flexible box model properties that people could use right away. His post has been replicated and linked to all over the Web. Unfortunately a lot of people who are not familiar with the spec for the flexible box model are under the impression that what’s in his stylesheet is it. So, with that in mind I’m loosing another stylesheet on the public that allows a greater utilization of the flexible box model. I’ll also give you a layout where a lot of these are in use so that you can see how they work.

Before I get going let me say this. The flexible box model is not perfect. It isn’t supported by IE9 or Opera. And now it looks like the W3C is bypassing it for a more robust grid system. Personally, I’d like to see something like the Silverlight grid system combined with aspects of the flexible box model. That would be the best of both approaches. If you’re targeting the mobile Web, in other words you intend on target Webkit browsers, you can expect robust support for the flexible box model. I doubt it’s going to go away just because the W3C doesn’t include it in any recommendation. I expect it to remain in Webkit for the foreseeable future because it’s already been in use for a number of years.

The flexible box model is about the way a collection of child nodes gets laid out in relation to each other and their parent node. To achieve its layout goals, the flexible box model offers properties for the parent node as well as for the child nodes that determine the layout characteristics of the child nodes.

To work with the flexible box model you need to define its display property to box:

1
2
3
4
#myDiv {
    display: -webkit-box;
    display: -moz-box;
}

Elements with display set to box can order their child nodes in two orientations: vertical or horizontal. If no orientation is provided, the box defaults to vertical:

1
2
3
4
5
6
#myDiv {
    display: -webkit-box;
   -webkit-box-orient: horizontal;
    display: -moz-box;
    -moz-box-orient: horizontal;
}

Besides defining the orientation, you can also designate what direction the child elements stack, either normal or reverse. A box direction of reverse means the elements display in the opposite order in which they physically appear in the document, so that the first would be last and the last first. By default the box direction is normal stacking order.

Then there is the packing order. This allows you to define how the child elements are packed inside the parent. By default they are packed in from the beginning of the parent. For vertical orientation this is the top and for horizontal orientation this is the left. Other packing orders are end, center and justify. If the packing order is end, for a vertical orientation the elements will stack up from the bottom. For a box with horizontal alignment, the boxes will stack from the right. A packing order of center means that for vertical orientation the child elements will be centered vertical with any left over space displayed equally at the top and bottom. For horizontal orientation a packing order of center means the elements are centered horizontally with left over space equally divided on the left and right. A packing order of justified means that any available space is spread equally between the child elements, for vertical orientation this is vertical spacing, and for horizontal orientation this is horizontal spacing.

Box-align-start

A box with alignment set to “start”

box-align-end

A box with alignment set to “end”

box-align-center

A box with alignment set to “center”

And elements can have their box alignment defined. The default is stretch. This stretches the dimensions of the child elements to fill the parent box. If the alignment is start, for horizontal orientation the elements are aligned to the top of the parent. If the orientation is vertical, they are aligned to the left of the parent. An alignment of end will align elements with horizontal alignment to the bottom of the parent. With vertical orientation they will be aligned to the right of the parent. An alignment of center will align horizontal elements along the horizontal center of the parent and for vertical orientation it will center them along the vertical center of the parent. There is also an alignment of baseline, but this is only for horizontal orientation. It aligns the elements along their horizontal baseline.

Then there is a set of properties that you can define on the child elements. These are flex and ordinal group. The flex property tells the browser how to deal with the dimensions of the child element. If you have three child elements and they don’t fill their parent, giving one of the a value of flex:1 will cause that element to take up all the left over space. If you gave one element flex: 1 and another one flex: 2, the available space would be divided up such that the element with flex: 1 would get one third of the available space and the element with flex: 2 would get two thirds of the available space. Of course the element with no flex value would default to whatever its width is. The ordinal group property allows you to designate groups of elements so that they appear in a different order than their document order. I’m not so sure about the practical use for this property. I’ve thought about it for months and have not been able to come up with a use case where I would need it. But it’s there.

I’ve created a flexible box model stylesheet with classes for all the various box properties. This means you can add the classes to an element to build out the definition you need for an element. I’ve also put together a interactive test case where you can dynamically toggle a number of the box properties and see their effect in real time. You can try it out online if you’re using Firefox, Chrome or Safari, or you can download the working example to dissect and learn.

Multiple Background Images & Animation

Multiple background images allow one to build up complex layered visual effects using one element. In the past such effects would require each background image rendered inside its own element, these being either nested or stacked on top of each other with positioning. When I was working on creating the progress bar example, I ran to a problem where I couldn’t seem to get a specific layer to animate. I could figure out what was going on. Recently, after looking at the code and fiddling with it, I found out what the problem was. Animation of background images works a little differently from other CSS properties. Because multiple backgrounds consists of multiple definitions, it works more like other properties with multiple property values: margins, borders, padding. For example, you can animate all borders on an element, otherwise you can animate a single border. Unfortunately, with multiple backgrounds there is no easy way to single out an individual background image for animation as you can with a border, margin or padding property.

Now the thing to bare in mind when dealing with multiple background images is the stacking order. The first image defined is the topmost image, and the last image defined is the bottommost. Same thing with animations for multiple background images. So, in the case of the animated progress bar, I wanted to animate the bottommost gradient image which consisted of white slanted bars. The rest of the progress bar was fine stable. Well, except that I used a single animation which would instead affect the topmost layer, making it impossible for me to get the stacking layer they way I wanted. Here is the gradient:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
background-color: rgb(56,138,213);
background-image:
    -webkit-gradient(linear, 18 0, 0 10,
        color-stop(0.23, rgba(255,255,255,0)),
        color-stop(0.3, rgba(255,255,255,0.8)),
        color-stop(0.3, rgba(255,255,255,1)),
        color-stop(0.7, rgba(255,255,255,1)),
        color-stop(0.7, rgba(255,255,255,0.8)),
        color-stop(0.77, rgba(255,255,255,0))),
    -webkit-gradient(linear, 0 0, 0 100%,
        color-stop(0, rgba(255,255,255,.8)),
        color-stop(0.45, rgba(255,255,255,.05)),
        color-stop(0.55, rgba(0,0,0,.05)),
        color-stop(0.85, rgba(0,0,0,.2)),
        color-stop(0.98, rgba(0,0,0,.5))),
    -webkit-gradient(linear, 0 0, 0 100%,
        color-stop(0.20, transparent),
        color-stop(0.20, rgba(255,255,255,.5)),
        color-stop(0.32, rgba(255,255,255,.5)),
        color-stop(0.32, transparent));

To animate this, I was using a key-frame animation that moved the x axis of the background gradient across the element from 0 to 100% in a loop:

1
2
3
4
@-webkit-keyframes progressBarAnim {
    0% { background-position-x:  0%; }
    100% { background-position-x: 100%; }
}

If you ran my previous example of the progress bar, it animates as you would expect, except one problem. The topmost gradient layer is the part that should be on the bottom. Yet every time I positioned it to where I wanted it, it wouldn’t animate. In my mind I was thinking that the key frame animation defined above would be animating all the background images. Actually, it doesn’t. It only animates the topmost image background, which is why I had to have the part I wanted to animate on top. Unfortunately I didn’t figure this out until recently. After a lot of fiddling and digging into what was going on with animation of multiple background images, I finally sorted it all out. When defining animations you have to start from the top and work you way down. You don’t have to include an animation for every background image, only down to the layer you need to. But you do have to include all the layers above the animated one up to the topmost one. So here’s my new stacking order for the CSS the way I actually wanted it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
background-color: rgb(56,138,213);
background-image:
    -webkit-gradient(linear, 0 0, 0 100%,
        color-stop(0, rgba(255,255,255,.8)),
        color-stop(0.45, rgba(255,255,255,.05)),
        color-stop(0.55, rgba(0,0,0,.05)),
        color-stop(0.85, rgba(0,0,0,.2)),
        color-stop(0.98, rgba(0,0,0,.5))),
    -webkit-gradient(linear, 0 0, 0 100%,
        color-stop(0.20, transparent),
        color-stop(0.20, rgba(255,255,255,.5)),
        color-stop(0.32, rgba(255,255,255,.5)),
        color-stop(0.32, transparent)),
    -webkit-gradient(linear, 18 0, 0 10,
        color-stop(0.23, rgba(255,255,255,0)),
        color-stop(0.3, rgba(255,255,255,0.8)),
        color-stop(0.3, rgba(255,255,255,1)),
        color-stop(0.7, rgba(255,255,255,1)),
        color-stop(0.7, rgba(255,255,255,0.8)),
        color-stop(0.77, rgba(255,255,255,0)));

And here’s the key frame animation, notice the extra animations for the upper layers:

1
2
3
4
@-webkit-keyframes progressBarAnim {
    0% { background-position-x:  0%, 0%, 0%; }
    100% { background-position-x: 0%, 0%, 100%; }
}

So remember, in the above key frame animation the first value if for the topmost layer and the last value is for the bottom most layer.

To show the difference in the stacking order, I changed the white stripe that goes horizontally across the progress bar to black. In the wrong stacking order version you can see that its actually behind the white stripes. The corrected version with multiple background animations has it correctly on top:

 

progress bar with incorrect stacking order

progress bar with incorrect stacking order

 

progress bar with correct stacking order

progress bar with correct stacking order

 

Of course, the final product would not be a black streak, it would be white. This was just to show how the stacking order was previously wrong.

Advertisements

Subpixel Rendering

You know the problem. No matter what you do you can’t get two elements to line up properly. The connecting points are always off by one pixel.

Everyone doing Web development at some point or other comes across a layout problem where no matter what you do, you can’t get two elements to align perfectly. One or the other is always off by one pixel. I was pulling my hair out try to get the pointers on the back and next buttons to align perfectly. They just didn’t look perfect. Worse still, when I used the browser’s “Zoom In” command from the view menu, I could clearly see that the lines did not connect properly.

After hours of fiddling with element sizes and positioning, I was on the verge of giving up. It was then that I remembered similar layout problems that I dealt with when doing Silverlight development. Silverlight is Microsoft’s vector-based, Flash killer/non-killer plugin for creating RIAs. For whatever reason, versiond before 4.0 had terrible problems with exact positioning of elements, causing frequent one pixel disconnects when rendered to screen. The only way to resolve this was to use subpixel rendering. This was accomplished by positioning an element by using partial pixel values, such as 1.5 or 1.25. This would force Silverlight to output the element with subpixel rendering, eliminating the visual disconnect.

OK, so what the heck is subpixel rendering? You experience it everyday with the browser’s font smoothing. You know it as anti-aliasing. The browser looks at the bézier curves of the font and when it sees that a line passes though a pixel, it looks at how much of the pixel is intersected. Depending on the percentage, the browser outputs a percentage of the font’s color. Less means the pixel gets less of the font’s color. For the human eye this creates the illusion of smoother curves.

You can use this same technique to trigger subpixel rendering on an element by giving it percentage-based position, or percentage-based dimensions. Here are some examples:

1
2
3
4
5
6
7
.button {
    position: absolute;
    left: 0px;
    top: 2.5px;
    height: 23.5px;
    width: 23.5px;
}

Here’s a image of my next button with the browser zoomed in. As you can see the pointer doesn’t line up perfectly with the rest of the button. This caused a slightly noticeable disconnect at normal size as well.

next button with its pointer misaligned

Now here’s the same button with the pointer using position set to top: 2.5px;:

next button using subpixel positioning

Subpixel rendering solved the connect problem I had at all zoom levels, including at normal size. Depending on your problem, subpixel positioning may be enough, or subpixel dimensions may be enough, or you may need to do both. Using subpixel values can help resolve problems when your layouts are not coming out pixel perfect.

You can try this out online or download the source code.

Today’s new technology terms:

subpixel:
   A pixel rendered with a shade of an adjacent element’s color to make it appear as if the element occupies part of that pixel’s space.
subpixelate:
   To force the browser to render an element with subpixel values.
subpixelation:
   The act of forcing an element to render with subpixel values or the condition of being rendered with subpixel values.
Advertisements